]> SALOME platform Git repositories - plugins/canrecplugin.git/commitdiff
Salome HOME
Qt 5 migration
authorvsr <vsr@opencascade.com>
Wed, 20 Jan 2016 09:27:18 +0000 (12:27 +0300)
committervsr <vsr@opencascade.com>
Wed, 20 Jan 2016 09:27:18 +0000 (12:27 +0300)
CMakeLists.txt
SalomeCANRECPLUGINConfig.cmake.in
src/CANRECPLUGINGUI/CMakeLists.txt

index 5fb62a60dd4c576b772a31bf37dbd505f940d16e..0043fa0677d5fbd78ac5866d11555883eaa68ae9 100644 (file)
@@ -111,7 +111,11 @@ FIND_PACKAGE(SalomeCR REQUIRED)
 FIND_PACKAGE(SalomeOmniORB REQUIRED)
 FIND_PACKAGE(SalomeOmniORBPy REQUIRED)
 IF(SALOME_BUILD_GUI)
-  FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui)
+  IF(NOT SALOME_GUI_BUILD_WITH_QT5)
+    FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui)
+  ELSE()
+    FIND_PACKAGE(SalomeQt5 REQUIRED)
+  ENDIF()
 ENDIF(SALOME_BUILD_GUI)
 IF(SALOME_BUILD_DOC)
   FIND_PACKAGE(SalomeDoxygen)
index d484ad753471bd6986bb0ea54b7dbab9f44c7d25..cd422639716d19ba1d82e37507367cf931cfac6a 100644 (file)
@@ -58,32 +58,34 @@ SET_AND_CHECK(GEOM_ROOT_DIR_EXP "@PACKAGE_GEOM_ROOT_DIR@")
 SET_AND_CHECK(CR_ROOT_DIR_EXP "@PACKAGE_CR_ROOT_DIR@")
 SET_AND_CHECK(OCCLICENSE_ROOT_DIR_EXP "@PACKAGE_OCCLICENSE_ROOT_DIR@")
 
-# For all prerequisites, load the corresponding targets if the package was used 
+# For all prerequisites, load the corresponding targets if the package was used
 # in CONFIG mode. This ensures dependent projects link correctly
 # without having to set LD_LIBRARY_PATH:
-SET(_PREREQ @_PREREQ_LIST@)
-SET(_PREREQ_CONFIG_DIR @_PREREQ_DIR_LIST@)
-SET(_PREREQ_COMPONENTS "@_PREREQ_COMPO_LIST@")
-LIST(LENGTH _PREREQ_CONFIG_DIR _list_len)
-IF(NOT _list_len EQUAL 0)
+SET(_PREREQ_@PROJECT_NAME@ @_PREREQ_LIST@)
+SET(_PREREQ_@PROJECT_NAME@_CONFIG_DIR @_PREREQ_DIR_LIST@)
+SET(_PREREQ_@PROJECT_NAME@_COMPONENTS "@_PREREQ_COMPO_LIST@")
+LIST(LENGTH _PREREQ_@PROJECT_NAME@_CONFIG_DIR _list_len_@PROJECT_NAME@)
+IF(NOT _list_len_@PROJECT_NAME@ EQUAL 0)
   # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
-  MATH(EXPR _range "${_list_len}-1")
-  FOREACH(_p RANGE ${_range})  
-    LIST(GET _PREREQ            ${_p} _pkg    )
-    LIST(GET _PREREQ_CONFIG_DIR ${_p} _pkg_dir)
-    LIST(GET _PREREQ_COMPONENTS ${_p} _pkg_compo)
-    MESSAGE(STATUS "===> Reloading targets from ${_pkg} ...")
-    IF(NOT _pkg_compo)
-      FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE 
-          PATHS "${_pkg_dir}" 
-          NO_DEFAULT_PATH)
-    ELSE()
-      STRING(REPLACE "," ";" _compo_lst "${_pkg_compo}")
-      MESSAGE(STATUS "===> (components: ${_pkg_compo})")
-      FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE
-          COMPONENTS ${_compo_lst} 
-          PATHS "${_pkg_dir}"
-          NO_DEFAULT_PATH)
+  MATH(EXPR _range_@PROJECT_NAME@ "${_list_len_@PROJECT_NAME@}-1")
+  FOREACH(_p_@PROJECT_NAME@ RANGE ${_range_@PROJECT_NAME@})
+    LIST(GET _PREREQ_@PROJECT_NAME@            ${_p_@PROJECT_NAME@} _pkg_@PROJECT_NAME@    )
+    LIST(GET _PREREQ_@PROJECT_NAME@_CONFIG_DIR ${_p_@PROJECT_NAME@} _pkg_dir_@PROJECT_NAME@)
+    LIST(GET _PREREQ_@PROJECT_NAME@_COMPONENTS ${_p_@PROJECT_NAME@} _pkg_compo_@PROJECT_NAME@)
+    IF(NOT OMIT_DETECT_PACKAGE_${_pkg_@PROJECT_NAME@})
+      MESSAGE(STATUS "===> Reloading targets from ${_pkg_@PROJECT_NAME@} ...")
+      IF(NOT _pkg_compo_@PROJECT_NAME@)
+        FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
+            PATHS "${_pkg_dir_@PROJECT_NAME@}"
+            NO_DEFAULT_PATH)
+      ELSE()
+        STRING(REPLACE "," ";" _compo_lst_@PROJECT_NAME@ "${_pkg_compo_@PROJECT_NAME@}")
+        MESSAGE(STATUS "===> (components: ${_pkg_compo_@PROJECT_NAME@})")
+        FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
+            COMPONENTS ${_compo_lst_@PROJECT_NAME@}
+            PATHS "${_pkg_dir_@PROJECT_NAME@}"
+            NO_DEFAULT_PATH)
+      ENDIF()
     ENDIF()
   ENDFOREACH()
 ENDIF()
index 3d3cf4d457d101b25f23125e420d05eefd87a481..fceacb2b62bd21874647d6da2b6cbdf25651c6d1 100644 (file)
@@ -17,8 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-INCLUDE(UseQt4Ext)
-INCLUDE(${QT_USE_FILE})
+INCLUDE(UseQtExt)
 
 # --- options ---
 # additional include directories
@@ -43,13 +42,6 @@ ADD_DEFINITIONS(
 
 # libraries to link to
 SET(_link_LIBRARIES
-#  ${GUI_SalomeApp}
-#  ${GUI_qtx}
-#  ${GUI_suit}
-#  ${GUI_SalomeObject}
-#  ${GUI_LightApp}
-#  ${CAS_KERNEL}
-#  ${GEOM_GEOM}
   ${GEOM_GEOMBase}
   SalomeIDLCANRECPlugin
 )
@@ -71,7 +63,7 @@ SET(CANRECPluginGUI_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
 # --- sources ---
 
 # sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
 
 # sources / static
 SET(_other_SOURCES
@@ -100,4 +92,4 @@ INSTALL(TARGETS CANRECPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${
 
 INSTALL(FILES ${CANRECPluginGUI_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
 
-QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_CANRECPLUGIN_INSTALL_RES_DATA}")
+QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_CANRECPLUGIN_INSTALL_RES_DATA}")