]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
Merge Qt5 porting. V8_0_0a1
authorimn <imn@opencascade.com>
Thu, 26 Nov 2015 14:38:21 +0000 (17:38 +0300)
committerrnv <rnv@opencascade.com>
Thu, 24 Dec 2015 15:06:24 +0000 (18:06 +0300)
CMakeLists.txt
src/MEDCalc/gui/CMakeLists.txt
src/MEDCalc/gui/dialogs/CMakeLists.txt
src/MEDGUI/CMakeLists.txt

index 7c960904736f445338628e7157c6733da96c6358..52675b6ad762f2a6643088a87b9a4731e4b13158 100644 (file)
@@ -105,7 +105,11 @@ IF(SALOME_BUILD_GUI)
     ELSE(EXISTS ${GUI_ROOT_DIR})
       MESSAGE(FATAL_ERROR "We absolutely need a Salome GUI, please define GUI_ROOT_DIR or turn option SALOME_BUILD_GUI to OFF !")
     ENDIF(EXISTS ${GUI_ROOT_DIR})
-    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_MED_ENABLE_PYTHON)
@@ -252,7 +256,6 @@ EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets}
 SET(KERNEL_ROOT_DIR "${KERNEL_ROOT_DIR}")
 SET(GUI_ROOT_DIR "${GUI_ROOT_DIR}")
 SET(MEDCOUPLING_ROOT_DIR "${MEDCOUPLING_ROOT_DIR}")
-SET(QT4_ROOT_DIR "${QT4_ROOT_DIR}")
 SET(MPI_ROOT_DIR "${MPI_ROOT_DIR}")
 SET(OMNIORB_ROOT_DIR "${OMNIORB_ROOT_DIR}")
 SET(PTHREAD_ROOT_DIR "${PTHREAD_ROOT_DIR}")
@@ -263,6 +266,11 @@ SET(CPPUNIT_ROOT_DIR "${CPPUNIT_ROOT_DIR}")
 SET(GRAPHVIZ_ROOT_DIR "${GRAPHVIZ_ROOT_DIR}")
 SET(DOXYGEN_ROOT_DIR "${DOXYGEN_ROOT_DIR}")
 SET(SPHINX_ROOT_DIR "${SPHINX_ROOT_DIR}")
+IF(NOT SALOME_BUILD_WITH_QT5)
+  SET(QT_ROOT_DIR "${QT4_ROOT_DIR}")
+ELSE()
+  SET(QT_ROOT_DIR "${QT5_ROOT_DIR}")
+ENDIF()
 
 #   - in the install tree:
 #       Get the relative path of the include directory so
@@ -270,14 +278,19 @@ SET(SPHINX_ROOT_DIR "${SPHINX_ROOT_DIR}")
 SET(CONF_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}")
 
 # Build variables that will be expanded when configuring Salome<MODULE>Config.cmake:
-SALOME_CONFIGURE_PREPARE(MEDCoupling Qt4 MPI omniORB CppUnit Graphviz Doxygen Sphinx  
-                         PThread Python)
+IF(NOT SALOME_BUILD_WITH_QT5)
+   SALOME_CONFIGURE_PREPARE(MEDCoupling Qt4 MPI omniORB CppUnit Graphviz Doxygen Sphinx  
+                                                                       PThread Python)
+ ELSE()                     
+       SALOME_CONFIGURE_PREPARE(MEDCoupling Qt5 MPI omniORB CppUnit Graphviz Doxygen Sphinx  
+                                                                       PThread Python)
+ENDIF()
 
 CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in
     ${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake
     INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
     PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX
-       KERNEL_ROOT_DIR GUI_ROOT_DIR MEDCOUPLING_ROOT_DIR QT4_ROOT_DIR MPI_ROOT_DIR
+       KERNEL_ROOT_DIR GUI_ROOT_DIR MEDCOUPLING_ROOT_DIR QT_ROOT_DIR MPI_ROOT_DIR
        OMNIORB_ROOT_DIR PTHREAD_ROOT_DIR SWIG_ROOT_DIR PYTHON_ROOT_DIR CPPUNIT_ROOT_DIR 
        GRAPHVIZ_ROOT_DIR DOXYGEN_ROOT_DIR SPHINX_ROOT_DIR)
 
index 69e62ba234f7c85925f0b016aa9bb91d2de71da7..aec534ad0befdbd6bf887a6670965bda05493373 100644 (file)
@@ -18,9 +18,8 @@
 #
 
 ADD_DEFINITIONS(${MEDFILE_DEFINITIONS} ${XDR_DEFINITIONS} ${OMNIORB_DEFINITIONS})
-INCLUDE(${QT_USE_FILE})
 SET(QT_LIBS "${QT_LIBRARIES}")
-INCLUDE(UseQt4Ext)
+INCLUDE(UseQtExt)
 
 ADD_SUBDIRECTORY(dialogs)
 
@@ -36,8 +35,8 @@ SET(MEDCALCGUI_SOURCES
 )
 
 SET(MEDCALCGUI_HEADERS MEDModule.hxx MEDEventListener_i.hxx WorkspaceController.hxx DatasourceController.hxx)
+QT_WRAP_MOC(MEDCALCGUI_HEADERS_MOC ${MEDCALCGUI_HEADERS})
 
-QT4_WRAP_CPP(MEDCALCGUI_HEADERS_MOC ${MEDCALCGUI_HEADERS})
 
 INCLUDE_DIRECTORIES(
   ${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS}
@@ -95,7 +94,7 @@ ENDIF(WITH_MEDMEMGUI)
 TARGET_LINK_LIBRARIES(MEDCALCGUI ${COMMON_FLAGS})
 
 INSTALL(TARGETS MEDCALCGUI DESTINATION ${SALOME_INSTALL_LIBS})
-QT4_INSTALL_TS_RESOURCES("${MEDCALCGUITS_SOURCES}" "${SALOME_MED_INSTALL_RES_DATA}")
+QT_INSTALL_TS_RESOURCES("${MEDCALCGUITS_SOURCES}" "${SALOME_MED_INSTALL_RES_DATA}")
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
 INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 3a49dfd8b2da1223cd617b61633ba81a8e0566b9..732d72d0f2f978d30b466bb257fde94b6fafd85d 100644 (file)
@@ -19,7 +19,7 @@
 
 ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
 
-INCLUDE(UseQt4Ext)
+INCLUDE(UseQtExt)
 
 SET(MEDCALCGUI_dialogs_FORMS
   GenericDialog.ui
@@ -29,7 +29,7 @@ SET(MEDCALCGUI_dialogs_FORMS
   DlgInterpolateField.ui
   DlgImageToMed.ui
 )
-QT4_WRAP_UI(MEDCALCGUI_dialogs_FORMS_HEADERS ${MEDCALCGUI_dialogs_FORMS})
+QT_WRAP_UIC(MEDCALCGUI_dialogs_FORMS_HEADERS ${MEDCALCGUI_dialogs_FORMS})
 
 SET(MEDCALCGUI_dialogs_FILES
   GenericDialog.hxx
@@ -39,7 +39,7 @@ SET(MEDCALCGUI_dialogs_FILES
   DlgInterpolateField.hxx
   DlgImageToMed.hxx
 )
-QT4_WRAP_CPP(MEDCALCGUI_dialogs_HEADERS_MOC ${MEDCALCGUI_dialogs_FILES})
+QT_WRAP_MOC(MEDCALCGUI_dialogs_HEADERS_MOC ${MEDCALCGUI_dialogs_FILES})
 
 INCLUDE_DIRECTORIES(
   ${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS}
@@ -47,7 +47,6 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_CURRENT_BINARY_DIR}
   ${GUI_INCLUDE_DIRS}
   ${CMAKE_CURRENT_SOURCE_DIR}/..
-  ${QT4_INCLUDE_DIRECTORY}
 )
 
 SET(MEDCALCGUI_dialogs_SOURCES
index f23692244bde6ca0b28e34a1a8bdbd7000a2abd9..7049df7c5ce959c87611500efc09e8d9587be8db 100644 (file)
@@ -19,8 +19,7 @@
 
 ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${MEDFILE_DEFINITIONS} ${XDR_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS})
 
-INCLUDE(${QT_USE_FILE})
-INCLUDE(UseQt4Ext)
+INCLUDE(UseQtExt)
 
 SET(MEDGUI_SOURCES
   MEDGUIFileContentDial.cxx
@@ -33,9 +32,9 @@ SET(MEDGUI_HEADERS MEDGUIFileContentDial.h MEDGUISelectComponents.h)
 SET(MEDGUI_FORMS MEDGUIFileContentDial.ui MEDGUISelectComponents.ui)
 #SET(MEDGUI_RESOURCES images.qrc)
 
-QT4_WRAP_CPP(MEDGUI_HEADERS_MOC ${MEDGUI_HEADERS})
-QT4_WRAP_UI(MEDGUI_FORMS_HEADERS ${MEDGUI_FORMS})
-#QT4_ADD_RESOURCES(MEDGUI_RESOURCES_RCC ${MEDGUI_RESOURCES})
+QT_WRAP_MOC(MEDGUI_HEADERS_MOC ${MEDGUI_HEADERS})
+QT_WRAP_UIC(MEDGUI_FORMS_HEADERS ${MEDGUI_FORMS})
+#QT_ADD_RESOURCES(MEDGUI_RESOURCES_RCC ${MEDGUI_RESOURCES})
 
 INCLUDE_DIRECTORIES(
   ${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS}
@@ -59,4 +58,4 @@ SET(MEDGUITS_SOURCES
 ADD_LIBRARY(MEDGUI SHARED ${MEDGUI_SOURCES} ${MEDGUI_HEADERS_MOC} ${MEDGUI_FORMS_HEADERS})
 TARGET_LINK_LIBRARIES(MEDGUI medcalculator ${QT_MT_LIBS} ${CAS_KERNEL} ${BOOST_LIBRARIES} ${GUI_LDFLAGS} ${SalomeApp} ${CAM} ${LightApp} ${qtx} ${suit} ${SalomeObject} ${PLATFORM_LIBS} ${SalomeLifeCycleCORBA})
 INSTALL(TARGETS MEDGUI DESTINATION ${SALOME_INSTALL_LIBS})
-QT4_INSTALL_TS_RESOURCES("${MEDGUITS_SOURCES}" "${SALOME_MED_INSTALL_RES_DATA}")
+QT_INSTALL_TS_RESOURCES("${MEDGUITS_SOURCES}" "${SALOME_MED_INSTALL_RES_DATA}")