From 04dbb12a82989963fcc823d898b49ad6ef0290ea Mon Sep 17 00:00:00 2001 From: mpa Date: Tue, 22 Oct 2013 15:00:04 +0000 Subject: [PATCH] - SALOME_BUILD_DOC, SALOME_BUILD_TESTS should be independent in each module - Add definitions and include directories of dependent modules --- CMakeLists.txt | 8 ++++++-- SalomeHexoticPLUGINConfig.cmake.in | 9 ++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 86aa262..6f7741d 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}) For use in the future -OPTION(SALOME_BUILD_DOC "Generate SALOME HexoticPLUGIN documentation" ${SALOME_BUILD_DOC}) +#OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON) #for use in the future +OPTION(SALOME_BUILD_DOC "Generate SALOME HexoticPLUGIN documentation" ON) # Advanced options: OPTION(SALOME_BUILD_GUI "Enable HexoticPLUGIN GUI" ON) @@ -95,6 +95,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}) @@ -133,6 +135,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}) diff --git a/SalomeHexoticPLUGINConfig.cmake.in b/SalomeHexoticPLUGINConfig.cmake.in index e32731e..a6db03c 100644 --- a/SalomeHexoticPLUGINConfig.cmake.in +++ b/SalomeHexoticPLUGINConfig.cmake.in @@ -43,21 +43,24 @@ SET_AND_CHECK(HexoticPLUGIN_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@") # Include directories SET_AND_CHECK(HexoticPLUGIN_INCLUDE_DIRS "${HexoticPLUGIN_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@") +SET(HexoticPLUGIN_INCLUDE_DIRS "${HexoticPLUGIN_INCLUDE_DIRS};@_SalomeHexoticPLUGIN_EXTRA_HEADERS@") +SET(HexoticPLUGIN_DEFINITIONS "@SMESH_DEFINITIONS@") #### Now the specificities # Options exported by the package: -#SET(SALOME_BUILD_TESTS @SALOME_BUILD_TESTS@) -SET(SALOME_HEXOTICPLUGIN_BUILD_DOC @SALOME_BUILD_DOC@) +#SET(SALOME_HexoticPLUGIN_BUILD_TESTS @SALOME_BUILD_TESTS@) +SET(SALOME_HexoticPLUGIN_BUILD_DOC @SALOME_BUILD_DOC@) # Advanced options -SET(SALOME_BUILD_GUI @SALOME_BUILD_GUI@) +SET(SALOME_HexoticPLUGIN_BUILD_GUI @SALOME_BUILD_GUI@) SET(SALOME_HEXOTICPLUGIN_USE_BLSURFPLUGIN @SALOME_HEXOTICPLUGIN_USEBLSURFPLUGIN@) # Level 1 prerequisites: IF(SALOME_HEXOTICPLUGIN_USE_BLSURFPLUGIN) SET_AND_CHECK(BLSURFPLUGIN_ROOT_DIR_EXP "@PACKAGE_BLSURFPLUGIN_ROOT_DIR@") + LIST(APPEND HexoticPLUGIN_DEFINITIONS "-DWITH_BLSURFPLUGIN") ELSE(SALOME_HEXOTICPLUGIN_USE_BLSURFPLUGIN) SET_AND_CHECK(SMESH_ROOT_DIR_EXP "@PACKAGE_BLSURFPLUGIN_ROOT_DIR@") IF(SALOME_HEXOTICPLUGIN_USE_BLSURFPLUGIN) -- 2.39.2