OPTION(SALOME_BUILD_DOC "Generate SALOME GUI documentation" ON)
OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON)
OPTION(SALOME_GUI_USE_OBSERVERS "Use study observers in GUI (advanced)" ON)
-OPTION(SALOME_BUILD_WITH_QT5 "Build SALOME with Qt5" ON)
-OPTION(SALOME_BUILD_WITH_PYQT5 "Build SALOME with PyQt5" ON)
+OPTION(SALOME_BUILD_WITH_QT5 "Build SALOME with Qt 5" OFF)
# Advanced options:
CMAKE_DEPENDENT_OPTION(SALOME_LIGHT_ONLY "Build SALOME Light only (no CORBA)" OFF
IF(NOT SALOME_BUILD_WITH_QT5)
FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml QtWebKit QtOpenGL QtNetwork)
INCLUDE(${QT_USE_FILE})
- #SET(SALOME_USE_PVVIEWER OFF)
ELSE()
- ADD_DEFINITIONS(-fPIC)
-# SET(CMAKE_AUTOMOC ON)
- SET(CMAKE_INCLUDE_CURRENT_DIR ON)
FIND_PACKAGE(SalomeQt5 REQUIRED)
- SET(SALOME_USE_PVVIEWER OFF)
ENDIF()
# PyQt
-IF (NOT SALOME_BUILD_WITH_PYQT5)
+IF (NOT SALOME_BUILD_WITH_QT5)
FIND_PACKAGE(SalomePyQt4 REQUIRED)
ELSE()
FIND_PACKAGE(SalomePyQt5 REQUIRED)
ADD_DEFINITIONS("-DDISABLE_PLOT2DVIEWER")
ENDIF()
IF (SALOME_USE_PVVIEWER)
+ IF(SALOME_BUILD_WITH_QT5)
+ SET(PARAVIEW_QT_VERSION "5")
+ ENDIF()
FIND_PACKAGE(SalomeParaView)
SALOME_LOG_OPTIONAL_PACKAGE(ParaView SALOME_USE_PVVIEWER)
ELSE()
ADD_DEFINITIONS("-DDISABLE_SALOMEOBJECT")
ENDIF()
-
# Detection summary:
-IF (NOT SALOME_BUILD_WITH_QT5)
- SALOME_PACKAGE_REPORT_AND_CHECK()
-ENDIF()
+SALOME_PACKAGE_REPORT_AND_CHECK()
+
# Directories
# (default values taken from KERNEL)
# ===========
LIST(APPEND _${PROJECT_NAME}_exposed_targets PVViewer PVServerService)
ENDIF()
-
# Python-based packages specific targets:
IF(SALOME_USE_PYCONSOLE)
LIST(APPEND _${PROJECT_NAME}_exposed_targets
SET(KERNEL_ROOT_DIR "${KERNEL_ROOT_DIR}")
SET(SIP_ROOT_DIR "${SIP_ROOT_DIR}")
IF(NOT SALOME_BUILD_WITH_QT5)
- SET(_QT_ROOT_DIR "${QT4_ROOT_DIR}")
-ELSE()
- SET(_QT_ROOT_DIR "${QT5_ROOT_DIR}")
-ENDIF()
-IF(NOT SALOME_BUILD_WITH_PYQT5)
- SET(_PYQT_ROOT_DIR "${PYQT4_ROOT_DIR}")
+ SET(QT_ROOT_DIR "${QT4_ROOT_DIR}")
+ SET(PYQT_ROOT_DIR "${PYQT4_ROOT_DIR}")
ELSE()
- SET(_PYQT_ROOT_DIR "${PYQT5_ROOT_DIR}")
+ SET(QT_ROOT_DIR "${QT5_ROOT_DIR}")
+ SET(PYQT_ROOT_DIR "${PYQT5_ROOT_DIR}")
ENDIF()
SET(CAS_ROOT_DIR "${CAS_ROOT_DIR}")
SET(OPENGL_ROOT_DIR "${OPENGL_ROOT_DIR}")
SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/include")
# Build variables that will be expanded when configuring Salome<MODULE>Config.cmake:
-SALOME_CONFIGURE_PREPARE(CAS OpenGL Qwt SIP VTK)
IF(NOT SALOME_BUILD_WITH_QT5)
- SALOME_CONFIGURE_PREPARE(Qt4)
-ELSE()
- SALOME_CONFIGURE_PREPARE(Qt5)
-ENDIF()
-IF(NOT SALOME_BUILD_WITH_PYQT5)
- SALOME_CONFIGURE_PREPARE(PyQt4)
+ SALOME_CONFIGURE_PREPARE(CAS OpenGL Qt4 PyQt4 Qwt SIP VTK)
ELSE()
- SALOME_CONFIGURE_PREPARE(PyQt5)
+ SALOME_CONFIGURE_PREPARE(CAS OpenGL Qt5 PyQt5 Qwt SIP VTK)
ENDIF()
CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in
${PROJECT_BINARY_DIR}/${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 SIP_ROOT_DIR _QT_ROOT_DIR _PYQT_ROOT_DIR CAS_ROOT_DIR
+ KERNEL_ROOT_DIR SIP_ROOT_DIR QT_ROOT_DIR PYQT_ROOT_DIR CAS_ROOT_DIR
OPENGL_ROOT_DIR VTK_ROOT_DIR QWT_ROOT_DIR)
# - in the install tree (VSR 16/08/2013: TEMPORARILY COMMENT THIS - TO REMOVE?):
# ${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 SIP_ROOT_DIR _QT_ROOT_DIR _PYQT_ROOT_DIR CAS_ROOT_DIR
+# KERNEL_ROOT_DIR SIP_ROOT_DIR QT_ROOT_DIR PYQT_ROOT_DIR CAS_ROOT_DIR
# OPENGL_ROOT_DIR VTK_ROOT_DIR QWT_ROOT_DIR)
WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
#### Now the specificities
# Options exported by the package:
-SET(SALOME_GUI_BUILD_DOC @SALOME_BUILD_DOC@)
-SET(SALOME_GUI_BUILD_TESTS @SALOME_BUILD_TESTS@)
-SET(SALOME_GUI_LIGHT_ONLY @SALOME_LIGHT_ONLY@)
+SET(SALOME_GUI_BUILD_DOC @SALOME_BUILD_DOC@)
+SET(SALOME_GUI_BUILD_TESTS @SALOME_BUILD_TESTS@)
+SET(SALOME_GUI_LIGHT_ONLY @SALOME_LIGHT_ONLY@)
+SET(SALOME_GUI_BUILD_WITH_QT5 @SALOME_BUILD_WITH_QT5@)
# Advanced options
SET(SALOME_USE_OCCVIEWER @SALOME_USE_OCCVIEWER@)
# Level 1 prerequisites:
SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_KERNEL_ROOT_DIR@")
SET_AND_CHECK(SIP_ROOT_DIR_EXP "@PACKAGE_SIP_ROOT_DIR@")
-SET_AND_CHECK(QT_ROOT_DIR_EXP "@PACKAGE_QT_ROOT_DIR@")
-SET_AND_CHECK(PYQT_ROOT_DIR_EXP "@PACKAGE_PYQT_ROOT_DIR@")
+IF(NOT SALOME_GUI_BUILD_WITH_QT5)
+ SET_AND_CHECK(QT4_ROOT_DIR_EXP "@PACKAGE_QT_ROOT_DIR@")
+ SET_AND_CHECK(PYQT4_ROOT_DIR_EXP "@PACKAGE_PYQT_ROOT_DIR@")
+ELSE()
+ SET_AND_CHECK(QT5_ROOT_DIR_EXP "@PACKAGE_QT_ROOT_DIR@")
+ SET_AND_CHECK(PYQT5_ROOT_DIR_EXP "@PACKAGE_PYQT_ROOT_DIR@")
+ENDIF()
SET_AND_CHECK(CAS_ROOT_DIR_EXP "@PACKAGE_CAS_ROOT_DIR@")
# Optional level 1 prerequisites: