]> SALOME platform Git repositories - plugins/ghs3dplugin.git/commitdiff
Salome HOME
- SALOME_BUILD_DOC, SALOME_BUILD_TESTS should be independent in each module
authormpa <mpa@opencascade.com>
Tue, 22 Oct 2013 14:25:30 +0000 (14:25 +0000)
committermpa <mpa@opencascade.com>
Tue, 22 Oct 2013 14:25:30 +0000 (14:25 +0000)
- Add definitions and include directories of dependent modules

CMakeLists.txt
SalomeGHS3DPLUGINConfig.cmake.in

index 9d513fded48bced1260d4ed7e9fc97ccd4e8fdfa..802a2f9794a7d8b03aeebf91147818daa7a39e93 100755 (executable)
@@ -60,9 +60,11 @@ LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/adm_local/cmake_files")
 # User options
 # (some options have already been defined in KERNEL) 
 # ============
-OPTION(SALOME_BUILD_GUI "Enable SMESH GUI" ON)
-OPTION(SALOME_BUILD_DOC "Generate SALOME GHS3DPLUGIN documentation" ${SALOME_BUILD_DOC})
-#OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ${SALOME_BUILD_TESTS}) For use in the future
+# OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON) #For use in the future
+OPTION(SALOME_BUILD_DOC "Generate SALOME GHS3DPLUGIN documentation" ON)
+
+# Advanced options:
+OPTION(SALOME_BUILD_GUI "Enable GUI" ON)
 
 ##
 ## From KERNEL:
@@ -77,8 +79,7 @@ FIND_PACKAGE(SalomeBoost REQUIRED)
 FIND_PACKAGE(SalomeOmniORB REQUIRED)
 FIND_PACKAGE(SalomeOmniORBPy REQUIRED)
 
-
-# Other KERNEL optionals
+# Other KERNEL optionals:  
 IF(SALOME_BUILD_DOC)
   FIND_PACKAGE(SalomeDoxygen)
   SALOME_LOG_OPTIONAL_PACKAGE(Doxygen SALOME_BUILD_DOC)
@@ -91,6 +92,8 @@ IF(SALOME_BUILD_GUI)
   IF(EXISTS ${GUI_ROOT_DIR})
     LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files")
     FIND_PACKAGE(SalomeGUI)
+    ADD_DEFINITIONS(${GUI_DEFINITIONS})
+    INCLUDE_DIRECTORIES(${GUI_INCLUDE_DIRS})
   ELSE(EXISTS ${GUI_ROOT_DIR})
     MESSAGE(FATAL_ERROR "We absolutely need a Salome GUI, please define GUI_ROOT_DIR")
   ENDIF(EXISTS ${GUI_ROOT_DIR})
@@ -105,11 +108,10 @@ IF(SALOME_BUILD_GUI)
   # Qt4
   FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui)
 ENDIF(SALOME_BUILD_GUI)
-
 # OCCT
 FIND_PACKAGE(SalomeCAS REQUIRED)
 # VTK
-FIND_PACKAGE(SalomeVTK 6.0)
+FIND_PACKAGE(SalomeVTK 6.0 REQUIRED)
 
 # Find GEOM
 # ===========
@@ -129,6 +131,13 @@ SET(SMESH_ROOT_DIR $ENV{SMESH_ROOT_DIR} CACHE PATH "Path to the Salome SMESH")
 IF(EXISTS ${SMESH_ROOT_DIR})
   LIST(APPEND CMAKE_MODULE_PATH "${SMESH_ROOT_DIR}/adm_local/cmake_files")
   FIND_PACKAGE(SalomeSMESH REQUIRED)
+  ADD_DEFINITIONS(${SMESH_DEFINITIONS})
+  INCLUDE_DIRECTORIES(${SMESH_INCLUDE_DIRS})
+  IF(SALOME_BUILD_GUI)
+    IF(NOT SALOME_SMESH_BUILD_GUI)
+      MESSAGE(FATAL_ERROR "We absolutely need a Salome SMESH with GUI, please set SALOME_BUILD_GUI=ON in SMESH module")
+    ENDIF(NOT SALOME_SMESH_BUILD_GUI)
+  ENDIF(SALOME_BUILD_GUI)
 ELSE(EXISTS ${SMESH_ROOT_DIR})
   MESSAGE(FATAL_ERROR "We absolutely need a Salome SMESH, please define SMESH_ROOT_DIR")
 ENDIF(EXISTS ${SMESH_ROOT_DIR})
index 36b0ca9a2945caa6b653dc1d980e134bb4536e9b..b6e7c8ff49b0fde85f4ea1d8d0bc3c15ee2ac0b2 100644 (file)
@@ -43,12 +43,17 @@ SET_AND_CHECK(GHS3DPLUGIN_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
 
 # Include directories
 SET_AND_CHECK(GHS3DPLUGIN_INCLUDE_DIRS "${GHS3DPLUGIN_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
+SET(GHS3DPLUGIN_INCLUDE_DIRS "${GHS3DPLUGIN_INCLUDE_DIRS};@_SalomeGHS3DPLUGIN_EXTRA_HEADERS@")
+SET(GHS3DPLUGIN_DEFINITIONS "@SMESH_DEFINITIONS@")
 
 #### Now the specificities
 
 # Options exported by the package:
-#SET(SALOME_BUILD_TESTS @SALOME_BUILD_TESTS@)
-SET(SALOME_BUILD_DOC   @SALOME_BUILD_DOC@)
+#SET(SALOME_GHS3DPLUGIN_BUILD_TESTS @SALOME_BUILD_TESTS@)
+SET(SALOME_GHS3DPLUGIN_BUILD_DOC   @SALOME_BUILD_DOC@)
+
+# Advanced options
+SET(SALOME_GHS3DPLUGIN_BUILD_GUI  @SALOME_BUILD_GUI@)
 
 # Level 1 prerequisites:
 SET_AND_CHECK(SMESH_ROOT_DIR_EXP "@PACKAGE_SMESH_ROOT_DIR@")