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

index f44cf97f453f941aabe7ba0a550e56c970fd2ea9..d4f1914954a8366168f6e0763cb73dfaa992000f 100644 (file)
@@ -120,7 +120,12 @@ FIND_PACKAGE(SalomeDXF 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 fabc216e25245bb890d67ffc6e37ae1c29c5c620..bd8d1640890bc08442057e882f943eed9f62882a 100644 (file)
@@ -18,8 +18,7 @@
 #
 
 IF(SALOME_BUILD_GUI)
-  INCLUDE(UseQt4Ext)
-  INCLUDE(${QT_USE_FILE})
+  INCLUDE(UseQtExt)
 ENDIF()
 
 # --- options ---
@@ -102,7 +101,7 @@ ENDIF()
 
 IF(SALOME_BUILD_GUI)
   # sources / moc wrappings
-  QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+  QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
 
   SET(DXFPluginGUI_SOURCES
     DXFPlugin_GUI.cxx
@@ -146,7 +145,7 @@ IF(SALOME_BUILD_GUI)
   TARGET_LINK_LIBRARIES(DXFPluginGUI ${_link_gui_LIBRARIES})
   INSTALL(TARGETS DXFPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
   # install resources
-  QT4_INSTALL_TS_RESOURCES("${DXFPlugin_RESOURCES}" "${SALOME_DXFPLUGIN_INSTALL_RES_DATA}")
+  QT_INSTALL_TS_RESOURCES("${DXFPlugin_RESOURCES}" "${SALOME_DXFPLUGIN_INSTALL_RES_DATA}")
 ENDIF()
 
 # install headers