From: CEA Support SALOME Date: Fri, 22 Jan 2016 11:13:21 +0000 (+0100) Subject: Update for Qt5 and add option SALOME_BUILD_WITH_QT5 X-Git-Tag: V8.0.0beta~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=29dd63db120fd68871e4ad38d4b4f967a53ffd5e;p=tools%2FSALOME.git Update for Qt5 and add option SALOME_BUILD_WITH_QT5 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index ab6fa02..62fa45d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,6 +49,7 @@ ENDIF(EXISTS ${KERNEL_ROOT_DIR}) # ============ OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON) OPTION(SALOME_BUILD_DOC "Generate SALOME SALOME documentation" ON) +OPTION(SALOME_BUILD_WITH_QT5 "Build SALOME with Qt 5" OFF) IF(SALOME_BUILD_TESTS) ENABLE_TESTING() @@ -81,9 +82,15 @@ ELSE(EXISTS ${GUI_ROOT_DIR}) MESSAGE(FATAL_ERROR "We absolutely need a Salome GUI, please define GUI_ROOT_DIR") ENDIF(EXISTS ${GUI_ROOT_DIR}) -# Qt4 -FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui) -INCLUDE(${QT_USE_FILE}) +# Qt +IF(NOT SALOME_BUILD_WITH_QT5) + FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui) +ELSE() + FIND_PACKAGE(SalomeQt5 REQUIRED) +ENDIF() + +#FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui) +#INCLUDE(${QT_USE_FILE}) # Directories # (default values taken from KERNEL) diff --git a/src/resources/CMakeLists.txt b/src/resources/CMakeLists.txt index 812fddc..d10001d 100644 --- a/src/resources/CMakeLists.txt +++ b/src/resources/CMakeLists.txt @@ -17,7 +17,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(UseQt4Ext) +INCLUDE(UseQtExt) # --- resources --- @@ -31,4 +31,4 @@ SET(_ts_RESOURCES # --- rules --- -QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_SALOME_PROFILE_INSTALL_RES_DATA}") +QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_SALOME_PROFILE_INSTALL_RES_DATA}")