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)
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}")
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
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)
#
ADD_DEFINITIONS(${MEDFILE_DEFINITIONS} ${XDR_DEFINITIONS} ${OMNIORB_DEFINITIONS})
-INCLUDE(${QT_USE_FILE})
SET(QT_LIBS "${QT_LIBRARIES}")
-INCLUDE(UseQt4Ext)
+INCLUDE(UseQtExt)
ADD_SUBDIRECTORY(dialogs)
)
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}
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})
ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
-INCLUDE(UseQt4Ext)
+INCLUDE(UseQtExt)
SET(MEDCALCGUI_dialogs_FORMS
GenericDialog.ui
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
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}
${CMAKE_CURRENT_BINARY_DIR}
${GUI_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/..
- ${QT4_INCLUDE_DIRECTORY}
)
SET(MEDCALCGUI_dialogs_SOURCES
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
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}
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}")