]> SALOME platform Git repositories - plugins/blsurfplugin.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 12:56:02 +0000 (12:56 +0000)
committermpa <mpa@opencascade.com>
Tue, 22 Oct 2013 12:56:02 +0000 (12:56 +0000)
- Add definitions and include directories of dependent modules

CMakeLists.txt
SalomeBLSURFPLUGINConfig.cmake.in

index 0d0a5e4abed5db42c7e5d807453e1dc8d8829804..5333e34f24c4c19a84319d1132b9fbba6c6f4ff9 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})
-OPTION(SALOME_BUILD_DOC "Generate SALOME BLSURFPLUGIN documentation" ${SALOME_BUILD_DOC})
+OPTION(SALOME_BUILD_DOC "Generate SALOME BLSURFPLUGIN documentation" ON)
+OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON)
 
 # Advanced options:
 OPTION(SALOME_BUILD_GUI "Enable BLSURFPLUGIN GUI" ON)
@@ -91,6 +91,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})
@@ -126,6 +128,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})
@@ -223,7 +232,7 @@ EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets}
 
 # Ensure the variables are always defined for the configure:
 SET(SMESH_ROOT_DIR "${SMESH_ROOT_DIR}")
-SET(MESHGEMS_ROOT_DIR  "${BLSURF_ROOT_DIR}")
+SET(MESHGEMS_ROOT_DIR  "${MESHGEMS_ROOT_DIR}")
  
 SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/include")
 CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in 
index 90c5e29fce9a8fb706cbcdc0e218e495caeb1f89..94f92feeb2eb9676e2cb22ac46c2ac8842d79d22 100644 (file)
@@ -43,6 +43,8 @@ SET_AND_CHECK(BLSURFPLUGIN_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
 
 # Include directories
 SET_AND_CHECK(BLSURFPLUGIN_INCLUDE_DIRS "${BLSURFPLUGIN_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
+SET(BLSURFPLUGIN_INCLUDE_DIRS "${BLSURFPLUGIN_INCLUDE_DIRS};@_SalomeBLSURFPLUGIN_EXTRA_HEADERS@")
+SET(BLSURFPLUGIN_DEFINITIONS "@SMESH_DEFINITIONS@")
 
 #### Now the specificities