From 99508d6c43817d800fb88e1ae8eab22f699163b5 Mon Sep 17 00:00:00 2001 From: imn Date: Fri, 27 Nov 2015 12:51:57 +0300 Subject: [PATCH] Migrate to Qt 5 --- CMakeLists.txt | 7 ++++++- src/CMakeLists.txt | 7 +++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index addbe0c..5b42870 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b58321f..28e742a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 -- 2.39.2