]> SALOME platform Git repositories - plugins/xtplugin.git/commitdiff
Salome HOME
Migrate to Qt 5 imn/porting_qt5
authorimn <imn@opencascade.com>
Fri, 27 Nov 2015 09:51:57 +0000 (12:51 +0300)
committerimn <imn@opencascade.com>
Fri, 27 Nov 2015 09:51:57 +0000 (12:51 +0300)
CMakeLists.txt
src/CMakeLists.txt

index addbe0c545862578faed694502cb13a1841f4413..5b42870b7cfe44ddc881eb40f561ca711762ad71 100644 (file)
@@ -113,7 +113,12 @@ FIND_PACKAGE(SalomeXT REQUIRED)
 FIND_PACKAGE(SalomeOmniORB REQUIRED)
 FIND_PACKAGE(SalomeOmniORBPy REQUIRED)
 IF(SALOME_BUILD_GUI)
-  FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui)
+  IF(NOT SALOME_GUI_BUILD_WITH_QT5)
+    FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui)
+    INCLUDE(${QT_USE_FILE})
+  ELSE()
+    FIND_PACKAGE(SalomeQt5 REQUIRED)
+  ENDIF()
 ENDIF(SALOME_BUILD_GUI)
 IF(SALOME_BUILD_DOC)
   FIND_PACKAGE(SalomeDoxygen)
index b58321ff9446aebca43fb51e086488c848ec4183..28e742a2d7a91eea8fc952365a71b08d987e9a22 100644 (file)
@@ -18,8 +18,7 @@
 #
 
 IF(SALOME_BUILD_GUI)
-  INCLUDE(UseQt4Ext)
-  INCLUDE(${QT_USE_FILE})
+  INCLUDE(UseQtExt)
 ENDIF()
 
 # --- options ---
@@ -100,7 +99,7 @@ ENDIF()
 
 IF(SALOME_BUILD_GUI)
   # sources / moc wrappings
-  QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+  QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
 
   SET(XTPluginGUI_SOURCES
     XTPlugin_GUI.cxx
@@ -143,7 +142,7 @@ IF(SALOME_BUILD_GUI)
   TARGET_LINK_LIBRARIES(XTPluginGUI ${_link_gui_LIBRARIES})
   INSTALL(TARGETS XTPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
   # install resources
-  QT4_INSTALL_TS_RESOURCES("${XTPlugin_RESOURCES}" "${SALOME_XTPLUGIN_INSTALL_RES_DATA}")
+  QT_INSTALL_TS_RESOURCES("${XTPlugin_RESOURCES}" "${SALOME_XTPLUGIN_INSTALL_RES_DATA}")
 ENDIF()
 
 # install headers