]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
- SALOME_BUILD_DOC, SALOME_BUILD_TESTS and SALOME_BUILD_GUI should be independent...
authormpa <mpa@opencascade.com>
Tue, 22 Oct 2013 07:35:44 +0000 (07:35 +0000)
committermpa <mpa@opencascade.com>
Tue, 22 Oct 2013 07:35:44 +0000 (07:35 +0000)
- Add definitions and include directories of dependent modules

CMakeLists.txt
SalomeSMESHConfig.cmake.in

index f77f11b506e9d23ededdc00b1960d30163c4b45d..2a535338899da54bf45a114db8006f570c990c3e 100755 (executable)
@@ -60,8 +60,8 @@ 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_TESTS "Build SALOME tests" ${SALOME_BUILD_TESTS}) For use in the future
-OPTION(SALOME_BUILD_DOC "Generate SALOME SMESH documentation" ${SALOME_BUILD_DOC})
+# OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON) For use in the future
+OPTION(SALOME_BUILD_DOC "Generate SALOME SMESH documentation" ON)
   
 # Advanced options:
 OPTION(SALOME_BUILD_GUI            "Enable GUI" ON)
@@ -75,10 +75,8 @@ IF(NOT WIN32)
   ADD_DEFINITIONS(-DENABLE_MEFISTO)
 ENDIF(NOT WIN32)
 
-
 MARK_AS_ADVANCED(SALOME_BUILD_GUI SALOME_SMESH_USE_CGNS SALOME_SMESH_USE_TBB)
 
-
 # Prerequisites
 # =============
 # Find "big" prerequisites first - they reference themselves many others
@@ -124,7 +122,7 @@ IF(SALOME_BUILD_GUI)
   IF(EXISTS ${GUI_ROOT_DIR})
     LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files")
     FIND_PACKAGE(SalomeGUI)
-
+    
     ##
     ## Prerequisites From GUI:
     ##
@@ -148,6 +146,13 @@ SET(GEOM_ROOT_DIR $ENV{GEOM_ROOT_DIR} CACHE PATH "Path to the Salome GEOM")
 IF(EXISTS ${GEOM_ROOT_DIR})
   LIST(APPEND CMAKE_MODULE_PATH "${GEOM_ROOT_DIR}/adm_local/cmake_files")
   FIND_PACKAGE(SalomeGEOM REQUIRED)
+  ADD_DEFINITIONS(${GEOM_DEFINITIONS})
+  INCLUDE_DIRECTORIES(${GEOM_INCLUDE_DIRS})
+  IF(SALOME_BUILD_GUI)
+    IF(NOT SALOME_GEOM_BUILD_GUI)
+      MESSAGE(FATAL_ERROR "We absolutely need a Salome GEOM with GUI, please set SALOME_BUILD_GUI=ON in GEOM module")
+    ENDIF(NOT SALOME_GEOM_BUILD_GUI)
+  ENDIF(SALOME_BUILD_GUI)
 ELSE(EXISTS ${GEOM_ROOT_DIR})
   MESSAGE(FATAL_ERROR "We absolutely need a Salome GEOM, please define GEOM_ROOT_DIR")
 ENDIF(EXISTS ${GEOM_ROOT_DIR})
index 5a25c2c8fdba8566b630543ff452baac133cf2b4..c875e75c0e3a04ae723dad65a96d3f8073de2fa5 100644 (file)
@@ -43,23 +43,26 @@ SET_AND_CHECK(SMESH_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
 
 # Include directories
 SET_AND_CHECK(SMESH_INCLUDE_DIRS "${SMESH_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
+SET(SMESH_INCLUDE_DIRS "${SMESH_INCLUDE_DIRS};@_SalomeSMESH_EXTRA_HEADERS@")
+SET(SMESH_DEFINITIONS "@GEOM_DEFINITIONS@")
 
 #### Now the specificities
 
 # Options exported by the package:
-SET(SALOME_BUILD_DOC    @SALOME_BUILD_DOC@)
+SET(SALOME_SMESH_BUILD_DOC @SALOME_BUILD_DOC@)
 
 # Advanced options
-SET(SALOME_BUILD_GUI       @SALOME_BUILD_GUI@)
+SET(SALOME_SMESH_BUILD_GUI @SALOME_BUILD_GUI@)
 SET(SALOME_SMESH_USE_CGNS  @SALOME_SMESH_USE_CGNS@)
 SET(SALOME_SMESH_USE_TBB   @SALOME_SMESH_USE_TBB@)
 SET(SALOME_SMESH_ENABLE_MEFISTO   @SALOME_SMESH_ENABLE_MEFISTO@)
+IF(NOT WIN32)
+  LIST(APPEND SMESH_DEFINITIONS "-DENABLE_MEFISTO")
+ENDIF(NOT WIN32)
 
 # Level 1 prerequisites:
 SET_AND_CHECK(GEOM_ROOT_DIR_EXP "@PACKAGE_GEOM_ROOT_DIR@")
 SET_AND_CHECK(MEDFILE_ROOT_DIR_EXP "@PACKAGE_MEDFILE_ROOT_DIR@")
-SET_AND_CHECK(CGNS_ROOT_DIR_EXP "@PACKAGE_CGNS_ROOT_DIR@")
-SET_AND_CHECK(TBB_ROOT_DIR_EXP "@PACKAGE_TBB_ROOT_DIR@")
 
 # Optional level 1 prerequisites:
 IF(SALOME_SMESH_USE_CGNS)