- SALOME_BUILD_DOC, SALOME_BUILD_TESTS and SALOME_BUILD_GUI should be independent in each module

- Add definitions and include directories of dependent modules
This commit is contained in:
mpa 2013-10-22 07:35:44 +00:00
parent 58d829687d
commit 233c58b13b
2 changed files with 17 additions and 9 deletions

View File

@ -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})

View 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)