]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Additional corrections
authorvsr <vsr@opencascade.com>
Thu, 19 Nov 2015 08:35:53 +0000 (11:35 +0300)
committervsr <vsr@opencascade.com>
Thu, 19 Nov 2015 08:35:53 +0000 (11:35 +0300)
CMakeLists.txt
SalomeGUIConfig.cmake.in

index 90f98e1c23c291d4243a72cd00aa4550d5d2c2f3..175ad8ca147a3ab7f8a164ff64825d78b56550e4 100755 (executable)
@@ -62,8 +62,7 @@ LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/adm_local/cmake_files")
 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
@@ -153,17 +152,12 @@ ENDIF()
 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)
@@ -190,6 +184,9 @@ ELSE()
   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()
@@ -214,11 +211,9 @@ IF(NOT SALOME_USE_SALOMEOBJECT)
   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)
 # ===========
@@ -372,7 +367,6 @@ IF(SALOME_USE_PVVIEWER)
   LIST(APPEND _${PROJECT_NAME}_exposed_targets PVViewer PVServerService)
 ENDIF()
 
-
 # Python-based packages specific targets:
 IF(SALOME_USE_PYCONSOLE)
   LIST(APPEND _${PROJECT_NAME}_exposed_targets 
@@ -405,14 +399,11 @@ EXPORT(TARGETS ${_${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}")
@@ -422,23 +413,17 @@ SET(QWT_ROOT_DIR "${QWT_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?):
@@ -449,7 +434,7 @@ 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 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
index 86d92ac2bd4707e3609c6d293b6575ed59f17db8..641eacac8dc8b010510e286ffe5cd4e594d5d3b1 100644 (file)
@@ -47,9 +47,10 @@ SET(GUI_DEFINITIONS "@KERNEL_DEFINITIONS@")
 #### 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@)
@@ -109,8 +110,13 @@ ENDIF()
 # 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: