From: mpa Date: Wed, 23 Oct 2013 05:31:45 +0000 (+0000) Subject: - SALOME_BUILD_DOC, SALOME_BUILD_TESTS should be independent in each module X-Git-Tag: V7_3_0a1~20 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fe5a4c74911d86e2b365159e47f09967f03dd9dc;p=modules%2Fhomard.git - SALOME_BUILD_DOC, SALOME_BUILD_TESTS should be independent in each module - Add definitions and include directories of dependent modules --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 26c64f86..d96492d8 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 HOMARD documentation" ${SALOME_BUILD_DOC}) +OPTION(SALOME_BUILD_DOC "Generate SALOME HOMARD documentation" ON) +OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON) ## ## From KERNEL: @@ -79,7 +79,7 @@ FIND_PACKAGE(SalomeHDF5 REQUIRED COMPONENTS C) # Other KERNEL optionals: IF(SALOME_USE_MPI) - FIND_PACKAGE(SalomeMPI) # needed for doc generation by Sphinx + FIND_PACKAGE(SalomeMPI REQUIRED) # needed for doc generation by Sphinx ENDIF() IF(SALOME_BUILD_DOC) FIND_PACKAGE(SalomeSphinx) @@ -92,6 +92,8 @@ SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR} CACHE PATH "Path to the Salome GUI") IF(EXISTS ${GUI_ROOT_DIR}) LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files") FIND_PACKAGE(SalomeGUI REQUIRED) + 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}) @@ -107,6 +109,8 @@ FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui) FIND_PACKAGE(SalomeSIP REQUIRED) # PyQt4 FIND_PACKAGE(SalomePyQt4 REQUIRED) +# OCCT +FIND_PACKAGE(SalomeCAS REQUIRED) # Find GEOM # =========== @@ -126,6 +130,8 @@ 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}) ELSE(EXISTS ${SMESH_ROOT_DIR}) MESSAGE(FATAL_ERROR "We absolutely need a Salome SMESH, please define SMESH_ROOT_DIR") ENDIF(EXISTS ${SMESH_ROOT_DIR}) @@ -137,13 +143,6 @@ ENDIF(EXISTS ${SMESH_ROOT_DIR}) # MedFile FIND_PACKAGE(SalomeMEDFile REQUIRED) -## -## HOMARD specifics -## - -# OCCT -FIND_PACKAGE(SalomeCAS REQUIRED) - # Detection summary: SALOME_PACKAGE_REPORT_AND_CHECK() diff --git a/SalomeHOMARDConfig.cmake.in b/SalomeHOMARDConfig.cmake.in index 360b1152..8e57d60b 100644 --- a/SalomeHOMARDConfig.cmake.in +++ b/SalomeHOMARDConfig.cmake.in @@ -43,12 +43,14 @@ SET_AND_CHECK(HOMARD_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@") # Include directories SET_AND_CHECK(HOMARD_INCLUDE_DIRS "${HOMARD_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@") +SET(HOMARD_INCLUDE_DIRS "${HOMARD_INCLUDE_DIRS};@_SalomeHOMARD_EXTRA_HEADERS@") +SET(HOMARD_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_HOMARD_BUILD_TESTS @SALOME_BUILD_TESTS@) +SET(SALOME_HOMARD_BUILD_DOC @SALOME_BUILD_DOC@) # Level 1 prerequisites: SET_AND_CHECK(SMESH_ROOT_DIR_EXP "@PACKAGE_SMESH_ROOT_DIR@")