]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Add macros: QT_WRAP_MOC, QT_WRAP_UIC, QT_ADD_RESOURCES and correction CMakeLists
authorimn <imn@opencascade.com>
Thu, 19 Nov 2015 15:02:20 +0000 (18:02 +0300)
committerimn <imn@opencascade.com>
Thu, 19 Nov 2015 15:02:20 +0000 (18:02 +0300)
47 files changed:
adm_local/cmake_files/FindSalomeQt5.cmake
adm_local/cmake_files/UseQtExt.cmake
src/CAF/CMakeLists.txt
src/CAM/CMakeLists.txt
src/Event/CMakeLists.txt
src/GLViewer/CMakeLists.txt
src/GUI_PY/CMakeLists.txt
src/GraphicsView/CMakeLists.txt
src/GuiHelpers/CMakeLists.txt
src/HelpBrowser/CMakeLists.txt
src/ImageComposer/CMakeLists.txt
src/LightApp/CMakeLists.txt
src/LogWindow/CMakeLists.txt
src/OBJECT/CMakeLists.txt
src/OCCViewer/CMakeLists.txt
src/ObjBrowser/CMakeLists.txt
src/PVViewer/CMakeLists.txt
src/PVViewer/resources/CMakeLists.txt
src/Plot2d/CMakeLists.txt
src/PyConsole/CMakeLists.txt
src/PyEditor/CMakeLists.txt
src/PyInterp/CMakeLists.txt
src/PyViewer/CMakeLists.txt
src/QDS/CMakeLists.txt
src/Qtx/CMakeLists.txt
src/QxScene/CMakeLists.txt
src/ResExporter/CMakeLists.txt
src/SALOME_PY/CMakeLists.txt
src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt
src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt
src/SALOME_PYQT/SalomePyQt/CMakeLists.txt
src/SALOME_SWIG/CMakeLists.txt
src/SOCC/CMakeLists.txt
src/SPlot2d/CMakeLists.txt
src/STD/CMakeLists.txt
src/SUIT/CMakeLists.txt
src/SUITApp/CMakeLists.txt
src/SVTK/CMakeLists.txt
src/SalomeApp/CMakeLists.txt
src/Session/CMakeLists.txt
src/Style/CMakeLists.txt
src/TOOLSGUI/CMakeLists.txt
src/TreeData/CMakeLists.txt
src/TreeData/Test/CMakeLists.txt
src/VTKViewer/CMakeLists.txt
src/ViewerTools/CMakeLists.txt
tools/dlgfactory/CMakeLists.txt

index 27884f1298f75888215f802a19ce526fdefb4790..88cbb3c517f07b914f075bde760bef9e234cec3d 100644 (file)
@@ -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) 
index 3d9c6f66d43d44fd2ec35b70fbe60ac5094713c1..9c3f5103c1f0919cc636b1e2f7fb2a36ca3001fd 100644 (file)
@@ -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)
index ee70e268c7825a5b3f3066e57c87877a2d8d8a13..4e524d8d5a75acc24f38ce46a5562233e38bc805 100755 (executable)
 #
 
 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
index ef70f561815496200cc11bcee81c5dc77f746812..012c32b5e95b8086e682012292f9c7a7f10479c8 100755 (executable)
 #
 
 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
index 09e9e2c84e4899171a25aba26242290551df0fcd..9da4673397a269cc4004ec2119d370c99fa9474b 100755 (executable)
 #
 
 # --- 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 ---
 
index 4f0108dc061093b7362b3f5800bea7c4ae124762..9fb0c2430f1aac7a2b7371497d2ccb02baa6e570 100755 (executable)
 #
 
 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
index 2d1714c2077105b258702c4a63eba2ed8f4887fb..ff4ebe3bf155b2389e3f6fc6e91405540c06ea2e 100755 (executable)
@@ -18,6 +18,7 @@
 #
 
 INCLUDE(UsePyQt)
+
 # --- resources ---
 
 # uic files / to be processed by pyuic
index eacb1af47dca149c2f8e8372e21c2c7e248d3e1d..feae6f3b49570bb22191323fc55a4c0779065372 100755 (executable)
 #
 
 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
index 29379501fea68388b56a9d04c52a035a0ba87c9f..d3c57b0429044bcf60dc0b911015d2a34549c502 100755 (executable)
 # 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
index 7eea49a87c00147b69a96c6ce8b28bde314fb54a..f67b5814e1819f1d9ba2b4b82aa16d96cdab8de9 100644 (file)
 # 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
index 6ee554dfa77eebe69ae4748cea9654eb372cbc19..534f6c2501c9a13807007e9ca430910e50005456 100755 (executable)
 # 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 ---
 
index 305671348329a21640c871eb53567f8d4e6666f4..04e309b4aa64b34fb62ee70bde2d6b1e9e1190a4 100755 (executable)
 #
 
 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
index 13a8a255c3d7773c8f07cbb1950753aad3602805..44bae202d309b521702728d5c63ae7856910e190 100755 (executable)
 #
 
 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)
index dd489c2950f357f721b2d7fa83e0c0e0db2c893b..e594ba3e1e6690b1815bd07e3080d062daef70d2 100755 (executable)
 #
 
 # --- 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 ---
 
index 1eb831ec936da924bd2d6ed49387914e84dbb8a6..888ff39565595df270ca96402b1b69c8c7bb94c5 100755 (executable)
 #
 
 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
index 24d298648e33ca6c1d4c702764671c6386f08c3b..dd40c3b2e082422cc7c8181e81f0d371cdcde7e2 100644 (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(
-  ${_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)
index 9e26191d4515b45b5813f7704dbded216783a6f3..a46356b0b01d77e2acfb7571bcc7fb36e5270886 100644 (file)
 # 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
index d90f5ed6a7dbebb0983f76f83cc9bc91fe52cce2..0b1bc7d08afb7a538ccb3be227cf5a13e7fbbfba 100644 (file)
@@ -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
index cbbeec3b0b99e698ea67f9887f27b6d75fb7541c..958e939d3bb549c875e14083686fb87f81d37798 100755 (executable)
 #
 
 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
index c0b4ca8a29956c806775b644ed2e4d5859441bb0..6dc393da57272a93437baf2b01340c118b1f224b 100755 (executable)
 #
 
 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
index f199d36df279b886ca151d424e5f16099f90efb3..f5e7beb4f3be0861e9151968348fac308f2f6089 100644 (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(
-  ${_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
index 33e16a02f83a5045b085de94819b582ab383959f..07cef33dbdfd82ec26bf5926fb1ec1075a7c2c5c 100755 (executable)
 # 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
index 32214bdfe06c31d5f1f0b08308bc860e43f438e3..0c6e5af2de890c83d0aca2785a8f359e6e5467d8 100644 (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()
 
 # 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
index 16cc8f1490a3b99b2372dc7257cef7cf6fdfc1b5..1fa265cce81f6ec973f69b4c0fd69ca3821e67af 100755 (executable)
 #
 
 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
index f12aff1b9af8ecd1f58a374320c04a52de273823..29697558d2a367cd0c075a52ed689196f2d34ec1 100755 (executable)
 #
 
 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
index f4d796801d3ce965b234131a5d8611d0843c72a9..a8398a7bc2cf98c920d4edaa5b56e118188fa6b7 100755 (executable)
 #
 
 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
index e4d12ae4089e7132a4daed9e17ddaff5316396a4..70e072215644044c2443b09b194c6b80a2d9f2dc 100755 (executable)
 #
 
 # --- 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 ---
 
index bb4beb27f2fd195172b5c85044c9e8d7f5659f60..31abe4b6e6dfcefe450528192eb264a8e57ea044 100755 (executable)
 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
index 8ba03240b139094865ca49042a9ce8a681c9d959..f68c105398431bfe46ba3b60625a6a21d5d350f0 100755 (executable)
 # 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)
index b6a9f4cfc5d7cc5fe9816029fd17097744738aee..8d9f6ed3544e44d276b2b403899a58c68c394616 100755 (executable)
@@ -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})
index a97afd43f9714d7c6aada8dcaf03b59b09a8ac1d..bba191dd1418fca2eed1f569d233255e407385fd 100755 (executable)
 # 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})
index 3fc03007e3587ce0b4185af7dfda4d308823180d..0f4f3e410d0709eb7fa152de3653b8ef16accf75 100755 (executable)
@@ -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 ---
 
index 3d5af9598178b5fbf2b47f4d169e30c4bfe7af16..2ca53c7088eb478c190ecb288b6b50f154c86414 100755 (executable)
 # 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
index 57c711b1b8b3e11cd8572164ace1ec9c2fd666ce..aa28f0996b010657121e60bca668b3abf76c69eb 100755 (executable)
 # 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
index dd93c39c1024fc35877757053723bea7a24a28a0..ef51dc0383dcd65bcd921eee61b8a1f23e6227cb 100755 (executable)
 #
 
 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
index e51235f05e800cb43a82f3f3835025fc06b89962..210626d92645fb9a001750506cf92976e70c2995 100644 (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(
-  ${_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
index 0ae4ed585f2060fed32655d3ac297c85fc70103e..f01da00ca844142661536aad364c3abff9369365 100755 (executable)
 #
 
 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
index 804dfc5f91ede0f0192956e82790d66750dc9ee0..5f7694d588860ec8050fa843d36935ef23da96b4 100755 (executable)
@@ -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
index d4881fd4e3c3606cd7ae20b960053ecb82d6fd2e..8c29843b48cb7a24af048184d5fa4a941ce87d9b 100755 (executable)
@@ -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
index 0172a793df4b766020c3f4cdce05785567471f65..4dec09b3071c6dbec2aec87604e63d4a08b1ed00 100755 (executable)
 #
 
 # --- 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}
index 375c62123e733ab829a72e659c313c8d208a1137..71056d6a6988490570eeb3abce50837234d5a8ed 100755 (executable)
 #
 
 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
index b9245e801e6cdfaf60e1016ee2a3a0bbbe3205d6..db9f680edc12350dd63ec93436558c0b8a58b797 100755 (executable)
@@ -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
index 32da700d28333be3026560c0dc43078046f7baab..ab243b708b5aa747ad54e453b14990d5ee996602 100755 (executable)
 # 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
index 1557afeda7be92bdda67ea0a81bf8eb6148df1dc..6011212275e56410edb426188d2dbafa98be4a5a 100755 (executable)
 # 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 ---
 
index 75b0f8e51bea7e08642f066de98f5dd9541cb0d1..47194846da5e0304174b6c88888eaddf70857cbd 100755 (executable)
 
 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
index 4391107a553e147f0e4e0ed823b03b43e152e4a4..3559088e843021dc2c5537b2a90054491a6bffa6 100755 (executable)
 #
 
 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
index d49b88bf18ccb3acf88ee11eef78c779f153aea0..0ef5b54dbd4133260ff3a9697d177c09e51a0de7 100755 (executable)
 #
 # 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})