From: imn Date: Thu, 19 Nov 2015 15:02:20 +0000 (+0300) Subject: Add macros: QT_WRAP_MOC, QT_WRAP_UIC, QT_ADD_RESOURCES and correction CMakeLists X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a483235c6446af05cbe77e5bbe1dc9ddddcdaeae;p=modules%2Fgui.git Add macros: QT_WRAP_MOC, QT_WRAP_UIC, QT_ADD_RESOURCES and correction CMakeLists --- diff --git a/adm_local/cmake_files/FindSalomeQt5.cmake b/adm_local/cmake_files/FindSalomeQt5.cmake index 27884f129..88cbb3c51 100644 --- a/adm_local/cmake_files/FindSalomeQt5.cmake +++ b/adm_local/cmake_files/FindSalomeQt5.cmake @@ -59,6 +59,10 @@ else(QT_LRELEASE_EXECUTABLE) endif(Linguist_FIND_REQUIRED) endif(QT_LRELEASE_EXECUTABLE) +SET(QT_INCLUDES ${Qt5Core_INCLUDES} ${Qt5Gui_INCLUDES} ${Qt5Widgets_INCLUDES} ${Qt5Network_INCLUDES} ${Qt5Xml_INCLUDES} ${Qt5OpenGL_INCLUDES} ${Qt5PrintSupport_INCLUDES} ${Qt5WebKit_INCLUDES} ${Qt5WebKitWidgets_INCLUDES} ${Qt5X11Extras_INCLUDES}) +SET(QT_DEFINITIONS ${Qt5Core_DEFINITIONS} ${Qt5Gui_DEFINITIONS} ${Qt5Widgets_DEFINITIONS} ${Qt5Network_DEFINITIONS} ${Qt5Xml_DEFINITIONS} ${Qt5OpenGL_DEFINITIONS} ${Qt5PrintSupport_DEFINITIONS} ${Qt5WebKit_DEFINITIONS} ${Qt5WebKitWidgets_DEFINITIONS} ${Qt5X11Extras_DEFINITIONS}) +SET(QT_LIBRARIES ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5OpenGL_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${Qt5WebKit_LIBRARIES} ${Qt5WebKitWidgets_LIBRARIES} ${Qt5X11Extras_LIBRARIES}) + #MARK_AS_ADVANCED(QT_QMAKE_EXECUTABLE) # IF(Qt5Core_FOUND) diff --git a/adm_local/cmake_files/UseQtExt.cmake b/adm_local/cmake_files/UseQtExt.cmake index 3d9c6f66d..9c3f5103c 100644 --- a/adm_local/cmake_files/UseQtExt.cmake +++ b/adm_local/cmake_files/UseQtExt.cmake @@ -38,3 +38,27 @@ MACRO(QT_INSTALL_TS_RESOURCES MYTSFILES WHERETOINSTALL) INSTALL(CODE "QT_COMPILE_TS_ON_INSTALL( \"${QT_LRELEASE_EXECUTABLE}\" \"${CMAKE_CURRENT_SOURCE_DIR}/${input}\" \"${CMAKE_INSTALL_PREFIX}/\${INSTALL_TS_DIR}\" ${output})") ENDFOREACH(input ${MYIDLFILES}) ENDMACRO(QT_INSTALL_TS_RESOURCES) + +MACRO(QT_WRAP_MOC) +IF (NOT SALOME_BUILD_WITH_QT5) + QT4_WRAP_CPP(${ARGN}) +ELSE() + QT5_WRAP_CPP(${ARGN}) +ENDIF() +ENDMACRO(QT_WRAP_MOC) + +MACRO(QT_WRAP_UIC) +IF (NOT SALOME_BUILD_WITH_QT5) + QT4_WRAP_UI(${ARGN}) +ELSE() + QT5_WRAP_UI(${ARGN}) +ENDIF() +ENDMACRO(QT_WRAP_UIC) + +MACRO(QT_ADD_RESOURCES) +IF (NOT SALOME_BUILD_WITH_QT5) + QT4_ADD_RESOURCES(${ARGN}) +ELSE() + QT5_ADD_RESOURCES(${ARGN}) +ENDIF() +ENDMACRO(QT_ADD_RESOURCES) diff --git a/src/CAF/CMakeLists.txt b/src/CAF/CMakeLists.txt index ee70e268c..4e524d8d5 100755 --- a/src/CAF/CMakeLists.txt +++ b/src/CAF/CMakeLists.txt @@ -18,20 +18,12 @@ # INCLUDE(UseQtExt) -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() + # --- options --- # additional include directories INCLUDE_DIRECTORIES( - ${_QT_INCLUDES} + ${QT_INCLUDES} ${CAS_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/src/Qtx ${PROJECT_SOURCE_DIR}/src/SUIT @@ -39,10 +31,10 @@ INCLUDE_DIRECTORIES( ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${CAS_DEFINITIONS} ${_QT_DEFINITIONS}) +ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${_QT_LIBRARIES} ${CAS_OCAF} ${CAS_OCAFVIS} qtx suit std) +SET(_link_LIBRARIES ${QT_LIBRARIES} ${CAS_OCAF} ${CAS_OCAFVIS} qtx suit std) # --- headers --- @@ -74,11 +66,7 @@ SET(_ts_RESOURCES # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES diff --git a/src/CAM/CMakeLists.txt b/src/CAM/CMakeLists.txt index ef70f5618..012c32b5e 100755 --- a/src/CAM/CMakeLists.txt +++ b/src/CAM/CMakeLists.txt @@ -18,20 +18,12 @@ # INCLUDE(UseQtExt) -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() + # --- options --- # additional include directories INCLUDE_DIRECTORIES( - ${_QT_INCLUDES} + ${QT_INCLUDES} ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}/src/Qtx ${PROJECT_SOURCE_DIR}/src/SUIT @@ -39,10 +31,10 @@ INCLUDE_DIRECTORIES( ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${_QT_LIBRARIES} qtx suit std) +SET(_link_LIBRARIES ${QT_LIBRARIES} qtx suit std) # --- headers --- @@ -75,11 +67,7 @@ SET(_ts_RESOURCES # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES diff --git a/src/Event/CMakeLists.txt b/src/Event/CMakeLists.txt index 09e9e2c84..9da467339 100755 --- a/src/Event/CMakeLists.txt +++ b/src/Event/CMakeLists.txt @@ -18,18 +18,12 @@ # # --- options --- -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() + # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${_QT_LIBRARIES}) +SET(_link_LIBRARIES ${QT_LIBRARIES}) # --- headers --- diff --git a/src/GLViewer/CMakeLists.txt b/src/GLViewer/CMakeLists.txt index 4f0108dc0..9fb0c2430 100755 --- a/src/GLViewer/CMakeLists.txt +++ b/src/GLViewer/CMakeLists.txt @@ -18,29 +18,21 @@ # INCLUDE(UseQtExt) -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES} ${Qt5OpenGL_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS} ${Qt5OpenGL_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES} ${Qt5OpenGL_LIBRARIES}) -ENDIF() + # --- options --- INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${_QT_INCLUDES} + ${QT_INCLUDES} ${PROJECT_SOURCE_DIR}/src/Qtx ${PROJECT_SOURCE_DIR}/src/SUIT ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${CAS_DEFINITIONS} ${_QT_DEFINITIONS}) +ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${_QT_LIBRARIES} ${CAS_KERNEL} ${OPENGL_LIBRARIES} qtx suit) +SET(_link_LIBRARIES ${QT_LIBRARIES} ${CAS_KERNEL} ${OPENGL_LIBRARIES} qtx suit) IF(NOT WIN32) LIST(APPEND _link_LIBRARIES Xmu) ENDIF() @@ -112,11 +104,8 @@ SET(_other_RESOURCES # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) + # sources / static SET(_other_SOURCES GLViewer_AspectLine.cxx diff --git a/src/GUI_PY/CMakeLists.txt b/src/GUI_PY/CMakeLists.txt index 2d1714c20..ff4ebe3bf 100755 --- a/src/GUI_PY/CMakeLists.txt +++ b/src/GUI_PY/CMakeLists.txt @@ -18,6 +18,7 @@ # INCLUDE(UsePyQt) + # --- resources --- # uic files / to be processed by pyuic diff --git a/src/GraphicsView/CMakeLists.txt b/src/GraphicsView/CMakeLists.txt index eacb1af47..feae6f3b4 100755 --- a/src/GraphicsView/CMakeLists.txt +++ b/src/GraphicsView/CMakeLists.txt @@ -18,30 +18,22 @@ # INCLUDE(UseQtExt) -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() + # --- options --- # additional include directories INCLUDE_DIRECTORIES( - ${_QT_INCLUDES} + ${QT_INCLUDES} ${PROJECT_SOURCE_DIR}/src/Qtx ${PROJECT_SOURCE_DIR}/src/SUIT ${PROJECT_SOURCE_DIR}/src/ImageComposer ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${_QT_LIBRARIES} qtx suit ImageComposer) +SET(_link_LIBRARIES ${QT_LIBRARIES} qtx suit ImageComposer) # --- headers --- @@ -93,11 +85,7 @@ SET(_other_RESOURCES # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES diff --git a/src/GuiHelpers/CMakeLists.txt b/src/GuiHelpers/CMakeLists.txt index 29379501f..d3c57b042 100755 --- a/src/GuiHelpers/CMakeLists.txt +++ b/src/GuiHelpers/CMakeLists.txt @@ -17,17 +17,12 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) -ENDIF() +INCLUDE(UseQtExt) + # additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${_QT_INCLUDES} + ${QT_INCLUDES} ${Boost_INCLUDE_DIRS} ${OMNIORB_INCLUDE_DIR} ${PTHREAD_INCLUDE_DIR} @@ -43,7 +38,7 @@ INCLUDE_DIRECTORIES( # additional preprocessor / compiler flags ADD_DEFINITIONS( ${CAS_DEFINITIONS} - ${_QT_DEFINITIONS} + ${QT_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS} ) @@ -76,11 +71,7 @@ SET(SalomeGuiHelpers_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES diff --git a/src/HelpBrowser/CMakeLists.txt b/src/HelpBrowser/CMakeLists.txt index 7eea49a87..f67b5814e 100644 --- a/src/HelpBrowser/CMakeLists.txt +++ b/src/HelpBrowser/CMakeLists.txt @@ -17,31 +17,24 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +INCLUDE(UseQtExt) + # --- options --- -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES} ${Qt5Network_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS} ${Qt5Network_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES}) -ENDIF() # additional include directories INCLUDE_DIRECTORIES( - ${_QT_INCLUDES} + ${QT_INCLUDES} ${PROJECT_SOURCE_DIR}/src/Qtx ) # additional preprocessor / compiler flags ADD_DEFINITIONS( - ${_QT_DEFINITIONS} + ${QT_DEFINITIONS} ) # libraries to link to SET(_link_LIBRARIES - ${_QT_LIBRARIES} + ${QT_LIBRARIES} qtx ) @@ -59,17 +52,12 @@ SET(_moc_HEADERS SET(_rcc_RESOURCES HelpBrowser.qrc) # --- sources --- -IF (NOT SALOME_BUILD_WITH_QT5) - # sources / moc wrappings - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) - # sources / rcc wrappings - QT4_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) -ELSE() - # sources / moc wrappings - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) - # sources / rcc wrappings - QT5_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) -ENDIF() + +# sources / moc wrappings +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) + +# sources / rcc wrappings +QT_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) # sources / to compile SET(_other_SOURCES diff --git a/src/ImageComposer/CMakeLists.txt b/src/ImageComposer/CMakeLists.txt index 6ee554dfa..534f6c250 100755 --- a/src/ImageComposer/CMakeLists.txt +++ b/src/ImageComposer/CMakeLists.txt @@ -17,26 +17,16 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() - # additional include directories INCLUDE_DIRECTORIES( - ${_QT_INCLUDES} + ${QT_INCLUDES} ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${_QT_LIBRARIES}) +SET(_link_LIBRARIES ${QT_LIBRARIES}) # --- headers --- diff --git a/src/LightApp/CMakeLists.txt b/src/LightApp/CMakeLists.txt index 305671348..04e309b4a 100755 --- a/src/LightApp/CMakeLists.txt +++ b/src/LightApp/CMakeLists.txt @@ -18,22 +18,13 @@ # INCLUDE(UseQtExt) -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES} ) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() # --- options --- # additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${_QT_INCLUDES} + ${QT_INCLUDES} ${HDF5_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIR} ${PROJECT_BINARY_DIR} @@ -97,7 +88,7 @@ IF(SALOME_USE_PYCONSOLE) ENDIF() # additional preprocessor / compiler flags -ADD_DEFINITIONS(${CAS_DEFINITIONS} ${_QT_DEFINITIONS} ${HDF5_DEFINITIONS}) +ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${HDF5_DEFINITIONS}) IF(SALOME_USE_PLOT2DVIEWER) ADD_DEFINITIONS(${QWT_DEFINITIONS}) ENDIF() @@ -108,7 +99,7 @@ ENDIF() # libraries to link to SET(_link_LIBRARIES ${CAS_KERNEL} - ${_QT_LIBRARIES} + ${QT_LIBRARIES} ${HDF5_LIBRARIES} CASCatch qtx suit std SalomeStyle SalomePrs CAM LogWindow ObjBrowser Event ${KERNEL_SalomeHDFPersist} ${KERNEL_SALOMELocalTrace} @@ -240,17 +231,12 @@ SET(_other_RESOURCES ) # --- sources --- -IF (NOT SALOME_BUILD_WITH_QT5) - # sources / moc wrappings - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) - # sources / rcc wrappings - QT4_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) -ELSE() - # sources / moc wrappings - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) - # sources / rcc wrappings - QT5_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) -ENDIF() + +# sources / moc wrappings +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) + +# sources / rcc wrappings +QT_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) # sources / static SET(_other_SOURCES diff --git a/src/LogWindow/CMakeLists.txt b/src/LogWindow/CMakeLists.txt index 13a8a255c..44bae202d 100755 --- a/src/LogWindow/CMakeLists.txt +++ b/src/LogWindow/CMakeLists.txt @@ -18,29 +18,21 @@ # INCLUDE(UseQtExt) -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() + # --- options --- # additional include directories INCLUDE_DIRECTORIES( - ${_QT_INCLUDES} + ${QT_INCLUDES} ${PROJECT_SOURCE_DIR}/src/Qtx ${PROJECT_SOURCE_DIR}/src/SUIT ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${_QT_LIBRARIES} qtx suit) +SET(_link_LIBRARIES ${QT_LIBRARIES} qtx suit) # --- headers --- @@ -62,11 +54,7 @@ SET(_ts_RESOURCES # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES LogWindow.cxx) diff --git a/src/OBJECT/CMakeLists.txt b/src/OBJECT/CMakeLists.txt index dd489c295..e594ba3e1 100755 --- a/src/OBJECT/CMakeLists.txt +++ b/src/OBJECT/CMakeLists.txt @@ -18,13 +18,6 @@ # # --- options --- -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() # additional include directories INCLUDE_DIRECTORIES( @@ -33,10 +26,10 @@ INCLUDE_DIRECTORIES( ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS} ${CAS_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${_QT_LIBRARIES} ${CAS_LDPATH} ${CAS_KERNEL} ${CAS_TKV3d} ViewerData) +SET(_link_LIBRARIES ${QT_LIBRARIES} ${CAS_LDPATH} ${CAS_KERNEL} ${CAS_TKV3d} ViewerData) # --- headers --- diff --git a/src/OCCViewer/CMakeLists.txt b/src/OCCViewer/CMakeLists.txt index 1eb831ec9..888ff3956 100755 --- a/src/OCCViewer/CMakeLists.txt +++ b/src/OCCViewer/CMakeLists.txt @@ -21,22 +21,14 @@ # INCLUDE(UseQtExt) -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() + # --- options --- # additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${OGL_INCLUDE_DIRS} - ${_QT_INCLUDES} + ${QT_INCLUDES} ${PTHREAD_INCLUDE_DIR} ${PROJECT_SOURCE_DIR}/src/CASCatch ${PROJECT_SOURCE_DIR}/src/Qtx @@ -47,11 +39,11 @@ INCLUDE_DIRECTORIES( ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS} ${CAS_DEFINITIONS} ${OGL_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${OGL_DEFINITIONS}) # libraries to link to SET(_link_LIBRARIES - ${OPENGL_LIBRARIES} ${_QT_LIBRARIES} ${CAS_KERNEL} ${CAS_VIEWER} ${CAS_TKGeomAlgo} + ${OPENGL_LIBRARIES} ${QT_LIBRARIES} ${CAS_KERNEL} ${CAS_VIEWER} ${CAS_TKGeomAlgo} ${CAS_TKTopAlgo} ${CAS_TKG2d} ${CAS_TKOpenGl} CASCatch qtx suit ViewerTools ViewerData OpenGLUtils ) @@ -152,17 +144,12 @@ SET(_other_RESOURCES ) # --- sources --- -IF (NOT SALOME_BUILD_WITH_QT5) - # sources / moc wrappings - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) - # sources / rcc wrappings - QT4_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) -ELSE() - # sources / moc wrappings - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) - # sources / rcc wrappings - QT5_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) -ENDIF() + +# sources / moc wrappings +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) + +# sources / rcc wrappings +QT_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) # sources / static SET(_other_SOURCES diff --git a/src/ObjBrowser/CMakeLists.txt b/src/ObjBrowser/CMakeLists.txt index 24d298648..dd40c3b2e 100644 --- a/src/ObjBrowser/CMakeLists.txt +++ b/src/ObjBrowser/CMakeLists.txt @@ -18,28 +18,20 @@ # INCLUDE(UseQtExt) -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() + # --- options --- # additional include directories INCLUDE_DIRECTORIES( - ${_QT_INCLUDES} + ${QT_INCLUDES} ${PROJECT_SOURCE_DIR}/src/Qtx ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${_QT_LIBRARIES} qtx) +SET(_link_LIBRARIES ${QT_LIBRARIES} qtx) # --- headers --- @@ -64,11 +56,7 @@ SET(_ts_RESOURCES # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES OB_Browser.cxx) diff --git a/src/PVViewer/CMakeLists.txt b/src/PVViewer/CMakeLists.txt index 9e26191d4..a46356b0b 100644 --- a/src/PVViewer/CMakeLists.txt +++ b/src/PVViewer/CMakeLists.txt @@ -17,11 +17,11 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(UseQtExt) - # Install ParaView filters, etc ... ADD_SUBDIRECTORY(resources) +INCLUDE(UseQtExt) + # --- options --- INCLUDE_DIRECTORIES( @@ -78,17 +78,12 @@ SET(_ts_RESOURCES ) # --- sources --- -IF (NOT SALOME_BUILD_WITH_QT5) - # sources / moc wrappings - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) - # sources / rcc wrappings - QT4_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) -ELSE() - # sources / moc wrappings - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) - # sources / rcc wrappings - QT5_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) -ENDIF() + +# sources / moc wrappings +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) + +# sources / rcc wrappings +QT_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) # sources / static SET(_other_SOURCES diff --git a/src/PVViewer/resources/CMakeLists.txt b/src/PVViewer/resources/CMakeLists.txt index d90f5ed6a..0b1bc7d08 100644 --- a/src/PVViewer/resources/CMakeLists.txt +++ b/src/PVViewer/resources/CMakeLists.txt @@ -17,6 +17,8 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +INCLUDE(UseQtExt) + SET(dist_salomeres_DATA ParaViewFilters.xml ParaViewSources.xml diff --git a/src/Plot2d/CMakeLists.txt b/src/Plot2d/CMakeLists.txt index cbbeec3b0..958e939d3 100755 --- a/src/Plot2d/CMakeLists.txt +++ b/src/Plot2d/CMakeLists.txt @@ -18,20 +18,12 @@ # INCLUDE(UseQtExt) -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() + # --- options --- # additional include directories INCLUDE_DIRECTORIES( - ${_QT_INCLUDES} + ${QT_INCLUDES} ${QWT_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/src/Qtx @@ -39,10 +31,10 @@ INCLUDE_DIRECTORIES( ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS} ${QWT_DEFINITIONS} ${PYTHON_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS} ${QWT_DEFINITIONS} ${PYTHON_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${_QT_LIBRARIES} ${QWT_LIBRARY} ${PYTHON_LIBRARIES} qtx suit) +SET(_link_LIBRARIES ${QT_LIBRARIES} ${QWT_LIBRARY} ${PYTHON_LIBRARIES} qtx suit) # --- headers --- @@ -116,11 +108,7 @@ SET(_other_RESOURCES # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES diff --git a/src/PyConsole/CMakeLists.txt b/src/PyConsole/CMakeLists.txt index c0b4ca8a2..6dc393da5 100755 --- a/src/PyConsole/CMakeLists.txt +++ b/src/PyConsole/CMakeLists.txt @@ -18,20 +18,12 @@ # INCLUDE(UseQtExt) -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() + # --- options --- # additional include directories INCLUDE_DIRECTORIES( - ${_QT_INCLUDES} + ${QT_INCLUDES} ${PYTHON_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/src/Qtx ${PROJECT_SOURCE_DIR}/src/SUIT @@ -40,10 +32,10 @@ INCLUDE_DIRECTORIES( ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS} ${PYTHON_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS} ${PYTHON_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${_QT_LIBRARIES} ${PYTHON_LIBRARIES} qtx suit PyInterp Event) +SET(_link_LIBRARIES ${QT_LIBRARIES} ${PYTHON_LIBRARIES} qtx suit PyInterp Event) # --- headers --- @@ -78,11 +70,7 @@ SET(_ts_RESOURCES # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES diff --git a/src/PyEditor/CMakeLists.txt b/src/PyEditor/CMakeLists.txt index f199d36df..f5e7beb4f 100644 --- a/src/PyEditor/CMakeLists.txt +++ b/src/PyEditor/CMakeLists.txt @@ -20,28 +20,20 @@ # INCLUDE(UseQtExt) -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() + # --- options --- # additional include directories INCLUDE_DIRECTORIES( - ${_QT_INCLUDES} + ${QT_INCLUDES} ${PROJECT_SOURCE_DIR}/src/Qtx ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${PLATFORM_LIBS} ${_QT_LIBRARIES} qtx) +SET(_link_LIBRARIES ${PLATFORM_LIBS} ${QT_LIBRARIES} qtx) # --- headers --- @@ -74,11 +66,7 @@ SET(_ts_RESOURCES ) # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES diff --git a/src/PyInterp/CMakeLists.txt b/src/PyInterp/CMakeLists.txt index 33e16a02f..07cef33db 100755 --- a/src/PyInterp/CMakeLists.txt +++ b/src/PyInterp/CMakeLists.txt @@ -17,29 +17,22 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() +INCLUDE(UseQtExt) + # --- options --- # additional include directories INCLUDE_DIRECTORIES( - ${_QT_INCLUDES} + ${QT_INCLUDES} ${PYTHON_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/src/Event ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS} ${PYTHON_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS} ${PYTHON_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${_QT_LIBRARIES} ${PYTHON_LIBRARIES} Event) +SET(_link_LIBRARIES ${QT_LIBRARIES} ${PYTHON_LIBRARIES} Event) # --- headers --- @@ -63,11 +56,7 @@ SET(PyInterp_HEADERS ${_other_HEADERS}) # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_internal_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_internal_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_internal_HEADERS}) # sources / static SET(_other_SOURCES diff --git a/src/PyViewer/CMakeLists.txt b/src/PyViewer/CMakeLists.txt index 32214bdfe..0c6e5af2d 100644 --- a/src/PyViewer/CMakeLists.txt +++ b/src/PyViewer/CMakeLists.txt @@ -20,29 +20,20 @@ # INCLUDE(UseQtExt) -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() # additional include directories INCLUDE_DIRECTORIES( - ${_QT_INCLUDES} + ${QT_INCLUDES} ${PROJECT_SOURCE_DIR}/src/Qtx ${PROJECT_SOURCE_DIR}/src/SUIT ${PROJECT_SOURCE_DIR}/src/PyEditor ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${PLATFORM_LIBS} ${_QT_LIBRARIES} qtx suit PyEditor) +SET(_link_LIBRARIES ${PLATFORM_LIBS} ${QT_LIBRARIES} qtx suit PyEditor) # header files / to be processed by moc SET(_moc_HEADERS @@ -72,17 +63,12 @@ SET(_ts_RESOURCES SET(_rcc_RESOURCES ${RESOURCES_PATH}/PyEditor.qrc) # --- sources --- -IF (NOT SALOME_BUILD_WITH_QT5) - # sources / moc wrappings - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) - # sources / rcc wrappings - QT4_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) -ELSE() - # sources / moc wrappings - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) - # sources / rcc wrappings - QT5_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) -ENDIF() + +# sources / moc wrappings +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) + +# sources / rcc wrappings +QT_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) # sources / static SET(_other_SOURCES diff --git a/src/QDS/CMakeLists.txt b/src/QDS/CMakeLists.txt index 16cc8f149..1fa265cce 100755 --- a/src/QDS/CMakeLists.txt +++ b/src/QDS/CMakeLists.txt @@ -18,30 +18,22 @@ # INCLUDE(UseQtExt) -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() + # --- options --- # additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${_QT_INCLUDES} + ${QT_INCLUDES} ${PROJECT_SOURCE_DIR}/src/Qtx ${PROJECT_SOURCE_DIR}/src/DDS ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS} ${CAS_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${_QT_LIBRARIES} ${CAS_KERNEL} qtx DDS) +SET(_link_LIBRARIES ${QT_LIBRARIES} ${CAS_KERNEL} qtx DDS) # --- headers --- @@ -82,11 +74,7 @@ SET(_ts_RESOURCES # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES diff --git a/src/Qtx/CMakeLists.txt b/src/Qtx/CMakeLists.txt index f12aff1b9..29697558d 100755 --- a/src/Qtx/CMakeLists.txt +++ b/src/Qtx/CMakeLists.txt @@ -18,26 +18,17 @@ # INCLUDE(UseQtExt) -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES} ${Qt5Xml_INCLUDES} ${Qt5WebKit_INCLUDES} ${Qt5WebKitWidgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS} ${Qt5Xml_DEFINITIONS} ${Qt5WebKit_DEFINITIONS} ${Qt5WebKitWidgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5WebKit_LIBRARIES} ${Qt5WebKitWidgets_LIBRARIES}) -ENDIF() # --- options --- # additional include directories -INCLUDE_DIRECTORIES(${_QT_INCLUDES}) +INCLUDE_DIRECTORIES(${QT_INCLUDES}) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${_QT_LIBRARIES} ${OPENGL_LIBRARIES}) +SET(_link_LIBRARIES ${QT_LIBRARIES} ${OPENGL_LIBRARIES}) # --- headers --- @@ -119,17 +110,12 @@ SET(_ts_RESOURCES resources/Qtx_msg_fr.ts ) # --- sources --- -IF (NOT SALOME_BUILD_WITH_QT5) - # sources / moc wrappings - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) - # sources / rcc wrappings - QT4_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) -ELSE() - # sources / moc wrappings - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) - # sources / rcc wrappings - QT5_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) -ENDIF() + +# sources / moc wrappings +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) + +# sources / rcc wrappings +QT_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) # sources / static SET(_other_SOURCES diff --git a/src/QxScene/CMakeLists.txt b/src/QxScene/CMakeLists.txt index f4d796801..a8398a7bc 100755 --- a/src/QxScene/CMakeLists.txt +++ b/src/QxScene/CMakeLists.txt @@ -18,29 +18,21 @@ # INCLUDE(UseQtExt) -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() + # --- options --- # additional include directories INCLUDE_DIRECTORIES( - ${_QT_INCLUDES} + ${QT_INCLUDES} ${PROJECT_SOURCE_DIR}/src/Qtx ${PROJECT_SOURCE_DIR}/src/SUIT ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${_QT_LIBRARIES} qtx suit) +SET(_link_LIBRARIES ${QT_LIBRARIES} qtx suit) # --- headers --- @@ -83,11 +75,7 @@ SET(_other_RESOURCES # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES diff --git a/src/ResExporter/CMakeLists.txt b/src/ResExporter/CMakeLists.txt index e4d12ae40..70e072215 100755 --- a/src/ResExporter/CMakeLists.txt +++ b/src/ResExporter/CMakeLists.txt @@ -18,29 +18,20 @@ # # --- options --- -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() # additional include directories INCLUDE_DIRECTORIES( - ${_QT_INCLUDES} + ${QT_INCLUDES} ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}/src/Qtx ${PROJECT_SOURCE_DIR}/src/SUIT ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${_QT_LIBRARIES} qtx suit) +SET(_link_LIBRARIES ${QT_LIBRARIES} qtx suit) # --- rules --- diff --git a/src/SALOME_PY/CMakeLists.txt b/src/SALOME_PY/CMakeLists.txt index bb4beb27f..31abe4b6e 100755 --- a/src/SALOME_PY/CMakeLists.txt +++ b/src/SALOME_PY/CMakeLists.txt @@ -20,20 +20,11 @@ INCLUDE(${VTK_USE_FILE}) # --- options --- -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() # additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${_QT_INCLUDES} + ${QT_INCLUDES} ${PYTHON_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/src/CAM ${PROJECT_SOURCE_DIR}/src/Event @@ -49,14 +40,14 @@ INCLUDE_DIRECTORIES( # additional preprocessor / compiler flags ADD_DEFINITIONS( ${CAS_DEFINITIONS} - ${_QT_DEFINITIONS} + ${QT_DEFINITIONS} ${PYTHON_DEFINITIONS} ) # libraries to link to SET(_link_LIBRARIES ${PYTHON_LIBRARIES} - ${_QT_LIBRARIES} + ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${VTK_LIBRARIES} LightApp diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt b/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt index 8ba03240b..f68c10539 100755 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt @@ -17,23 +17,17 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +INCLUDE(UseQtExt) IF(SALOME_USE_VTKVIEWER) INCLUDE(${VTK_USE_FILE}) ENDIF() # --- options --- -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) -ENDIF() # additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${_QT_INCLUDES} + ${QT_INCLUDES} ${SIP_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIR} @@ -51,7 +45,7 @@ INCLUDE_DIRECTORIES( # additional preprocessor / compiler flags ADD_DEFINITIONS( - ${_QT_DEFINITIONS} + ${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${PYTHON_DEFINITIONS} ${BOOST_DEFINITIONS} @@ -82,11 +76,7 @@ SET(SalomePyQtGUI_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES SALOME_PYQT_Module.cxx) diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt b/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt index b6a9f4cfc..8d9f6ed35 100755 --- a/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt +++ b/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt @@ -23,18 +23,11 @@ IF(SALOME_USE_VTKVIEWER) ENDIF() # --- options --- -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) -ENDIF() # additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${_QT_INCLUDES} + ${QT_INCLUDES} ${SIP_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIR} @@ -55,7 +48,7 @@ INCLUDE_DIRECTORIES( # additional preprocessor / compiler flags ADD_DEFINITIONS( - ${_QT_DEFINITIONS} + ${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${PYTHON_DEFINITIONS} ) @@ -98,11 +91,7 @@ SET(_sip_files SALOME_PYQT_GUILight.sip) # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / sip wrappings PYQT_WRAP_SIP(_sip_SOURCES ${_sip_files}) diff --git a/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt b/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt index a97afd43f..bba191dd1 100755 --- a/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt +++ b/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt @@ -17,24 +17,18 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +INCLUDE(UseQtExt) INCLUDE(UsePyQt) IF(SALOME_USE_VTKVIEWER) INCLUDE(${VTK_USE_FILE}) ENDIF() # --- options --- -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) -ENDIF() # additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${_QT_INCLUDES} + ${QT_INCLUDES} ${QWT_INCLUDE_DIR} ${SIP_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} @@ -79,7 +73,7 @@ ENDIF(SALOME_LIGHT_ONLY) # additional preprocessor / compiler flags ADD_DEFINITIONS( ${QWT_DEFINITIONS} - ${_QT_DEFINITIONS} + ${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS} @@ -111,11 +105,7 @@ ENDIF(SALOME_USE_PLOT2DVIEWER) # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / sip wrappings PYQT_WRAP_SIP(_sip_SOURCES ${_sip_files}) diff --git a/src/SALOME_SWIG/CMakeLists.txt b/src/SALOME_SWIG/CMakeLists.txt index 3fc03007e..0f4f3e410 100755 --- a/src/SALOME_SWIG/CMakeLists.txt +++ b/src/SALOME_SWIG/CMakeLists.txt @@ -23,19 +23,12 @@ IF(SALOME_USE_VTKVIEWER) ENDIF() # --- options --- -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) -ENDIF() # additional include directories INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_DIRS} ${CAS_INCLUDE_DIRS} - ${_QT_INCLUDES} + ${QT_INCLUDES} ${QWT_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/src/CAM @@ -60,7 +53,7 @@ SET_SOURCE_FILES_PROPERTIES(libSALOME_Swig.i PROPERTIES SWIG_DEFINITIONS "-shado SET_SOURCE_FILES_PROPERTIES(libSALOME_SwigPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "-DHAVE_CONFIG_H") # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS} ${QWT_DEFINITIONS} ${CAS_DEFINITIONS} ${PYTHON_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS} ${QWT_DEFINITIONS} ${CAS_DEFINITIONS} ${PYTHON_DEFINITIONS}) # --- headers --- diff --git a/src/SOCC/CMakeLists.txt b/src/SOCC/CMakeLists.txt index 3d5af9598..2ca53c708 100755 --- a/src/SOCC/CMakeLists.txt +++ b/src/SOCC/CMakeLists.txt @@ -17,21 +17,14 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +INCLUDE(UseQtExt) + # --- options --- -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() # additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${_QT_INCLUDES} + ${QT_INCLUDES} ${PROJECT_SOURCE_DIR}/src/Qtx ${PROJECT_SOURCE_DIR}/src/SUIT ${PROJECT_SOURCE_DIR}/src/OBJECT @@ -41,11 +34,11 @@ INCLUDE_DIRECTORIES( ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS} ${CAS_DEFINITIONS} ${OGL_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${OGL_DEFINITIONS}) # libraries to link to SET(_link_LIBRARIES - ${_QT_LIBRARIES} ${CAS_KERNEL} ${CAS_VIEWER} + ${QT_LIBRARIES} ${CAS_KERNEL} ${CAS_VIEWER} qtx suit SalomeObject SalomePrs OCCViewer ) @@ -69,11 +62,7 @@ SET(SOCC_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES diff --git a/src/SPlot2d/CMakeLists.txt b/src/SPlot2d/CMakeLists.txt index 57c711b1b..aa28f0996 100755 --- a/src/SPlot2d/CMakeLists.txt +++ b/src/SPlot2d/CMakeLists.txt @@ -17,21 +17,14 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +INCLUDE(UseQtExt) + # --- options --- -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() # additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${_QT_INCLUDES} + ${QT_INCLUDES} ${QWT_INCLUDE_DIR} ${PROJECT_SOURCE_DIR}/src/Qtx ${PROJECT_SOURCE_DIR}/src/SUIT @@ -41,10 +34,10 @@ INCLUDE_DIRECTORIES( ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS} ${QWT_DEFINITIONS} ${CAS_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS} ${QWT_DEFINITIONS} ${CAS_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${_QT_LIBRARIES} ${QWT_LIBRARY} qtx suit Plot2d SalomePrs SalomeObject) +SET(_link_LIBRARIES ${QT_LIBRARIES} ${QWT_LIBRARY} qtx suit Plot2d SalomePrs SalomeObject) # --- headers --- @@ -68,11 +61,7 @@ SET(SPlot2d_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES diff --git a/src/STD/CMakeLists.txt b/src/STD/CMakeLists.txt index dd93c39c1..ef51dc038 100755 --- a/src/STD/CMakeLists.txt +++ b/src/STD/CMakeLists.txt @@ -18,29 +18,21 @@ # INCLUDE(UseQtExt) -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() + # --- options --- # additional include directories INCLUDE_DIRECTORIES( - ${_QT_INCLUDES} + ${QT_INCLUDES} ${PROJECT_SOURCE_DIR}/src/Qtx ${PROJECT_SOURCE_DIR}/src/SUIT ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${_QT_LIBRARIES} qtx suit) +SET(_link_LIBRARIES ${QT_LIBRARIES} qtx suit) # --- headers --- @@ -92,11 +84,7 @@ SET(_other_RESOURCES # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES diff --git a/src/SUIT/CMakeLists.txt b/src/SUIT/CMakeLists.txt index e51235f05..210626d92 100644 --- a/src/SUIT/CMakeLists.txt +++ b/src/SUIT/CMakeLists.txt @@ -18,32 +18,24 @@ # INCLUDE(UseQtExt) -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() + # --- options --- # additional include directories INCLUDE_DIRECTORIES( - ${_QT_INCLUDES} + ${QT_INCLUDES} ${PROJECT_SOURCE_DIR}/src/Qtx ${PROJECT_SOURCE_DIR}/src/ObjBrowser ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) IF(ENABLE_TESTRECORDER) ADD_DEFINITIONS("-DENABLE_TESTRECORDER ${TESTRECORDER_DEFINITIONS}") ENDIF() # libraries to link to -SET(_link_LIBRARIES ${PLATFORM_LIBS} ${_QT_LIBRARIES} qtx ObjBrowser) +SET(_link_LIBRARIES ${PLATFORM_LIBS} ${QT_LIBRARIES} qtx ObjBrowser) IF(ENABLE_TESTRECORDER) LIST(APPEND _link_LIBRARIES ${TESTRECORDER_LIBS}) ENDIF() @@ -115,11 +107,7 @@ SET(_other_RESOURCES # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES diff --git a/src/SUITApp/CMakeLists.txt b/src/SUITApp/CMakeLists.txt index 0ae4ed585..f01da00ca 100755 --- a/src/SUITApp/CMakeLists.txt +++ b/src/SUITApp/CMakeLists.txt @@ -18,20 +18,12 @@ # INCLUDE(UseQtExt) -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() + # --- options --- # additional include directories INCLUDE_DIRECTORIES( - ${_QT__INCLUDES} + ${QT__INCLUDES} ${PYTHON_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIR} ${PROJECT_BINARY_DIR} @@ -41,13 +33,13 @@ INCLUDE_DIRECTORIES( ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS} ${PYTHON_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS} ${PYTHON_DEFINITIONS}) IF(ENABLE_TESTRECORDER) ADD_DEFINITIONS("-DENABLE_TESTRECORDER ${TESTRECORDER_DEFINITIONS}") ENDIF() # libraries to link to -SET(_link_LIBRARIES ${PLATFORM_LIBS} ${_QT_LIBRARIES} qtx suit SalomeStyle) +SET(_link_LIBRARIES ${PLATFORM_LIBS} ${QT_LIBRARIES} qtx suit SalomeStyle) IF(SALOME_USE_PYCONSOLE) LIST(APPEND _link_LIBRARIES ${PYTHON_LIBRARIES}) ENDIF() @@ -88,11 +80,7 @@ SET(_ts_RESOURCES # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES diff --git a/src/SVTK/CMakeLists.txt b/src/SVTK/CMakeLists.txt index 804dfc5f9..5f7694d58 100755 --- a/src/SVTK/CMakeLists.txt +++ b/src/SVTK/CMakeLists.txt @@ -21,20 +21,11 @@ INCLUDE(UseQtExt) INCLUDE(${VTK_USE_FILE}) # --- options --- -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES} ${Qt5X11Extras_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS} ${Qt5X11Extras_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES} ${Qt5X11Extras_LIBRARIES}) -ENDIF() # additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${_QT_INCLUDES} + ${QT_INCLUDES} ${Boost_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIR} ${PROJECT_SOURCE_DIR}/src/Qtx @@ -47,7 +38,7 @@ INCLUDE_DIRECTORIES( ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS}) # libraries to link to SET(_link_LIBRARIES @@ -157,11 +148,7 @@ SET(_other_RESOURCES # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS} ${_moc_internal_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS} ${_moc_internal_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS} ${_moc_internal_HEADERS}) # sources / static SET(_other_SOURCES diff --git a/src/SalomeApp/CMakeLists.txt b/src/SalomeApp/CMakeLists.txt index d4881fd4e..8c29843b4 100755 --- a/src/SalomeApp/CMakeLists.txt +++ b/src/SalomeApp/CMakeLists.txt @@ -32,7 +32,7 @@ ENDIF() # additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${_QT_INCLUDES} + ${QT_INCLUDES} ${QWT_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIR} @@ -63,7 +63,7 @@ ENDIF() # additional preprocessor / compiler flags ADD_DEFINITIONS( - ${_QT_DEFINITIONS} + ${QT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${QWT_DEFINITIONS} ${CAS_DEFINITIONS} @@ -77,7 +77,7 @@ ENDIF() # libraries to link to SET(_link_LIBRARIES ${CAS_KERNEL} - ${_QT_LIBRARIES} + ${QT_LIBRARIES} ${PYTHON_LIBRARIES} ${KERNEL_OpUtil} ${KERNEL_SALOMELocalTrace} ${KERNEL_SalomeDSClient} ${KERNEL_TOOLSDS} CASCatch suit std CAM ObjBrowser SalomePrs Event @@ -184,11 +184,7 @@ SET(_other_RESOURCES # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES diff --git a/src/Session/CMakeLists.txt b/src/Session/CMakeLists.txt index 0172a793d..4dec09b30 100755 --- a/src/Session/CMakeLists.txt +++ b/src/Session/CMakeLists.txt @@ -18,19 +18,10 @@ # # --- options --- -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES} ${Qt5X11Extras_LIBRARIES}) -ENDIF() # additional include directories INCLUDE_DIRECTORIES( - ${_QT_INCLUDES} + ${QT_INCLUDES} ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${CAS_INCLUDE_DIRS} @@ -52,7 +43,7 @@ INCLUDE_DIRECTORIES( # additional preprocessor / compiler flags ADD_DEFINITIONS( - ${_QT_DEFINITIONS} + ${QT_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS} ${CAS_DEFINITIONS} @@ -64,7 +55,7 @@ ENDIF() # libraries to link to SET(_link_LIBRARIES - ${_QT_LIBRARIES} + ${QT_LIBRARIES} ${CAS_KERNEL} ${OMNIORB_LIBRARIES} ${KERNEL_SalomeNS} diff --git a/src/Style/CMakeLists.txt b/src/Style/CMakeLists.txt index 375c62123..71056d6a6 100755 --- a/src/Style/CMakeLists.txt +++ b/src/Style/CMakeLists.txt @@ -18,28 +18,20 @@ # INCLUDE(UseQtExt) -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES} ${Qt5Network_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS} ${Qt5Network_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES}) -ENDIF() + # --- options --- # additional include directories INCLUDE_DIRECTORIES( - ${_QT_INCLUDES} + ${QT_INCLUDES} ${PROJECT_SOURCE_DIR}/src/Qtx ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${_QT_LIBRARIES} qtx) +SET(_link_LIBRARIES ${QT_LIBRARIES} qtx) # --- headers --- @@ -78,17 +70,12 @@ SET(_ts_RESOURCES resources/Style_msg_fr.ts SET(_other_RESOURCES resources/SalomeStyle.xml) # --- sources --- -IF (NOT SALOME_BUILD_WITH_QT5) - # sources / moc wrappings - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) - # sources / rcc wrappings - QT4_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) -ELSE() - # sources / moc wrappings - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) - # sources / rcc wrappings - QT5_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) -ENDIF() + +# sources / moc wrappings +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) + +# sources / rcc wrappings +QT_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) # sources / static SET(_other_SOURCES diff --git a/src/TOOLSGUI/CMakeLists.txt b/src/TOOLSGUI/CMakeLists.txt index b9245e801..db9f680ed 100755 --- a/src/TOOLSGUI/CMakeLists.txt +++ b/src/TOOLSGUI/CMakeLists.txt @@ -21,7 +21,7 @@ INCLUDE(UseQtExt) # --- options --- INCLUDE_DIRECTORIES( - ${_QT_INCLUDES} + ${QT_INCLUDES} ${CAS_INCLUDE_DIRS} ${OMNIORB_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} @@ -32,7 +32,7 @@ INCLUDE_DIRECTORIES( # additional preprocessor / compiler flags ADD_DEFINITIONS( - ${_QT_DEFINITIONS} + ${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS} @@ -40,7 +40,7 @@ ADD_DEFINITIONS( # libraries to link to SET(_link_LIBRARIES - ${_QT_LIBRARIES} + ${QT_LIBRARIES} ${CAS_KERNEL} ${KERNEL_SalomeIDLKernel} ${KERNEL_SALOMELocalTrace} @@ -78,11 +78,7 @@ SET(_ts_RESOURCES # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES diff --git a/src/TreeData/CMakeLists.txt b/src/TreeData/CMakeLists.txt index 32da700d2..ab243b708 100755 --- a/src/TreeData/CMakeLists.txt +++ b/src/TreeData/CMakeLists.txt @@ -17,23 +17,16 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +INCLUDE(UseQtExt) + ADD_SUBDIRECTORY(Test) # --- options --- -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() # additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${_QT_INCLUDES} + ${QT_INCLUDES} ${OMNIORB_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIR} @@ -50,7 +43,7 @@ INCLUDE_DIRECTORIES( # additional preprocessor / compiler flags ADD_DEFINITIONS( ${CAS_DEFINITIONS} - ${_QT_DEFINITIONS} + ${QT_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS} ) @@ -58,7 +51,7 @@ ADD_DEFINITIONS( # libraries to link to SET(_link_LIBRARIES ${OMNIORB_LIBRARIES} - ${_QT_LIBRARIES} + ${QT_LIBRARIES} ${KERNEL_SalomeLifeCycleCORBA} ${KERNEL_SalomeKernelHelpers} qtx suit std CAM ObjBrowser LightApp SalomeApp ) @@ -89,11 +82,7 @@ SET(SalomeTreeData_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES diff --git a/src/TreeData/Test/CMakeLists.txt b/src/TreeData/Test/CMakeLists.txt index 1557afeda..601121227 100755 --- a/src/TreeData/Test/CMakeLists.txt +++ b/src/TreeData/Test/CMakeLists.txt @@ -17,33 +17,26 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +INCLUDE(UseQtExt) + # --- options --- -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() # additional include directories INCLUDE_DIRECTORIES( ${OMNIORB_INCLUDE_DIR} - ${_QT_INCLUDES} + ${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR} ${PROJECT_SOURCE_DIR}/src/GuiHelpers ${PROJECT_SOURCE_DIR}/src/TreeData ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${_QT_DEFINITIONS}) +ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${QT_DEFINITIONS}) # libraries to link to SET(_link_LIBRARIES ${CORBA_LIBS} - ${_QT_LIBRARIES} + ${QT_LIBRARIES} SalomeTreeData SalomeGuiHelpers ${KERNEL_SalomeLifeCycleCORBA} ${KERNEL_SalomeKernelHelpers} ) @@ -58,17 +51,11 @@ SET(_uic_files mainwindow.ui) # header files / to be processed by moc SET(_moc_HEADERS mainwindow.hxx) -IF (NOT SALOME_BUILD_WITH_QT5) - # header files / uic wrappings - QT4_WRAP_UI(_uic_HEADERS ${_uic_files}) - # sources / moc wrappings - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - # header files / uic wrappings - QT5_WRAP_UI(_uic_HEADERS ${_uic_files}) - # sources / moc wrappings - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +# header files / uic wrappings +QT_WRAP_UIC(_uic_HEADERS ${_uic_files}) + +# sources / moc wrappings +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # --- sources --- diff --git a/src/VTKViewer/CMakeLists.txt b/src/VTKViewer/CMakeLists.txt index 75b0f8e51..47194846d 100755 --- a/src/VTKViewer/CMakeLists.txt +++ b/src/VTKViewer/CMakeLists.txt @@ -19,32 +19,23 @@ INCLUDE(${VTK_USE_FILE}) INCLUDE(UseQtExt) -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() # --- options --- # additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${_QT_INCLUDES} + ${QT_INCLUDES} ${PTHREAD_INCLUDE_DIR} ${PROJECT_SOURCE_DIR}/src/Qtx ${PROJECT_SOURCE_DIR}/src/SUIT ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${CAS_DEFINITIONS} ${_QT_DEFINITIONS}) +ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${_QT_LIBRARIES} ${OPENGL_LIBRARIES} ${VTK_LIBRARIES} ${CAS_KERNEL} qtx suit ${KERNEL_SALOMELocalTrace}) +SET(_link_LIBRARIES ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${VTK_LIBRARIES} ${CAS_KERNEL} qtx suit ${KERNEL_SALOMELocalTrace}) # --- headers --- @@ -136,17 +127,12 @@ SET(_other_RESOURCES ) # --- sources --- -IF (NOT SALOME_BUILD_WITH_QT5) - # sources / moc wrappings - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) - # sources / rcc wrappings - QT4_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) -ELSE() - # sources / moc wrappings - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) - # sources / rcc wrappings - QT5_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) -ENDIF() + +# sources / moc wrappings +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) + +# sources / rcc wrappings +QT_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) # sources / static SET(_other_SOURCES diff --git a/src/ViewerTools/CMakeLists.txt b/src/ViewerTools/CMakeLists.txt index 4391107a5..3559088e8 100755 --- a/src/ViewerTools/CMakeLists.txt +++ b/src/ViewerTools/CMakeLists.txt @@ -18,28 +18,20 @@ # INCLUDE(UseQtExt) -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_INCLUDES ${QT_INCLUDES}) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_INCLUDES ${Qt5Widgets_INCLUDES}) - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() + # --- options --- # additional include directories INCLUDE_DIRECTORIES( - ${_QT_INCLUDES} + ${QT_INCLUDES} ${PROJECT_SOURCE_DIR}/src/Qtx ) # additional preprocessor / compiler flags -ADD_DEFINITIONS(${_QT_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${_QT_LIBRARIES} qtx) +SET(_link_LIBRARIES ${QT_LIBRARIES} qtx) # --- headers --- @@ -68,11 +60,7 @@ SET(_ts_RESOURCES # --- sources --- # sources / moc wrappings -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ELSE() - QT5_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -ENDIF() +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES diff --git a/tools/dlgfactory/CMakeLists.txt b/tools/dlgfactory/CMakeLists.txt index d49b88bf1..0ef5b54db 100755 --- a/tools/dlgfactory/CMakeLists.txt +++ b/tools/dlgfactory/CMakeLists.txt @@ -16,13 +16,13 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +INCLUDE(UseQtExt) INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ) - SET(qtester_SOURCES qtester.cxx ) @@ -56,15 +56,7 @@ SET(GenericDialog_FORMS GenericDialog.ui ) -IF (NOT SALOME_BUILD_WITH_QT5) - SET(_QT_DEFINITIONS ${QT_DEFINITIONS}) - SET(_QT_LIBRARIES ${QT_LIBRARIES}) -ELSE() - SET(_QT_DEFINITIONS ${Qt5Widgets_DEFINITIONS}) - SET(_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) -ENDIF() - -ADD_DEFINITIONS(${_QT_DEFINITIONS}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_CUSTOM_COMMAND( OUTPUT QDialogTest.cxx QDialogTest.h QDialogTest.ui COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/dlgfactory.py -s -n QDialogTest -t qdialog @@ -74,32 +66,22 @@ ADD_CUSTOM_COMMAND( OUTPUT GDialogTest.cxx GDialogTest.h GDialogTest.ui COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/dlgfactory.py -s -n GDialogTest -t gdialog ) -IF (NOT SALOME_BUILD_WITH_QT5) - QT4_WRAP_UI(qtester_FORMS_HEADERS ${qtester_FORMS} ) - QT4_WRAP_CPP(qtester_HEADERS_MOC ${qtester_HEADERS}) - - QT4_WRAP_UI(gtester_FORMS_HEADERS ${gtester_FORMS} ) - QT4_WRAP_CPP(gtester_HEADERS_MOC ${gtester_HEADERS}) + QT_WRAP_UIC(qtester_FORMS_HEADERS ${qtester_FORMS} ) + QT_WRAP_MOC(qtester_HEADERS_MOC ${qtester_HEADERS}) - QT4_WRAP_UI(GenericDialog_FORMS_HEADERS ${GenericDialog_FORMS} ) - QT4_WRAP_CPP(GenericDialog_HEADERS_MOC ${GenericDialog_HEADERS}) -ELSE() - QT5_WRAP_UI(qtester_FORMS_HEADERS ${qtester_FORMS} ) - QT5_WRAP_CPP(qtester_HEADERS_MOC ${qtester_HEADERS}) + QT_WRAP_UIC(gtester_FORMS_HEADERS ${gtester_FORMS} ) + QT_WRAP_MOC(gtester_HEADERS_MOC ${gtester_HEADERS}) - QT5_WRAP_UI(gtester_FORMS_HEADERS ${gtester_FORMS} ) - QT5_WRAP_CPP(gtester_HEADERS_MOC ${gtester_HEADERS}) + QT_WRAP_UIC(GenericDialog_FORMS_HEADERS ${GenericDialog_FORMS} ) + QT_WRAP_MOC(GenericDialog_HEADERS_MOC ${GenericDialog_HEADERS}) - QT5_WRAP_UI(GenericDialog_FORMS_HEADERS ${GenericDialog_FORMS} ) - QT5_WRAP_CPP(GenericDialog_HEADERS_MOC ${GenericDialog_HEADERS}) -ENDIF() ADD_EXECUTABLE(qtester ${qtester_SOURCES} ${qtester_HEADERS_MOC} ${qtester_FORMS_HEADERS} QDialogTest.cxx ) -TARGET_LINK_LIBRARIES(qtester ${_QT_LIBRARIES}) +TARGET_LINK_LIBRARIES(qtester ${QT_LIBRARIES}) ADD_EXECUTABLE(gtester ${gtester_SOURCES} ${gtester_HEADERS_MOC} @@ -108,6 +90,6 @@ ADD_EXECUTABLE(gtester ${gtester_SOURCES} ${GenericDialog_FORMS_HEADERS} GDialogTest.cxx ) -TARGET_LINK_LIBRARIES(gtester ${_QT_LIBRARIES}) +TARGET_LINK_LIBRARIES(gtester ${QT_LIBRARIES}) INSTALL(TARGETS qtester gtester DESTINATION ${SALOME_INSTALL_BINS})