From 49410ad3e8e0f2055f56c4ee5c54cb2ffd06dad4 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 25 Jan 2016 18:07:30 +0300 Subject: [PATCH] Add Qt 4 / Qt 5 option to Application template --- src/AppQuickStart/app-template/CMakeLists.txt | 9 ++++++--- .../app-template/src/resources/CMakeLists.txt | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/AppQuickStart/app-template/CMakeLists.txt b/src/AppQuickStart/app-template/CMakeLists.txt index cb14d25bd..8e70282c5 100644 --- a/src/AppQuickStart/app-template/CMakeLists.txt +++ b/src/AppQuickStart/app-template/CMakeLists.txt @@ -81,9 +81,12 @@ 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_GUI_BUILD_WITH_QT5) + FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui) +ELSE() + FIND_PACKAGE(SalomeQt5 REQUIRED) +ENDIF() # Directories # (default values taken from KERNEL) diff --git a/src/AppQuickStart/app-template/src/resources/CMakeLists.txt b/src/AppQuickStart/app-template/src/resources/CMakeLists.txt index 763c42ee4..f55a264f8 100644 --- a/src/AppQuickStart/app-template/src/resources/CMakeLists.txt +++ b/src/AppQuickStart/app-template/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_[NAME_OF_APPLICATION]_PROFILE_INSTALL_RES_DATA}") +QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_[NAME_OF_APPLICATION]_PROFILE_INSTALL_RES_DATA}") -- 2.39.2