]> SALOME platform Git repositories - modules/homard.git/commitdiff
Salome HOME
- SALOME_BUILD_DOC, SALOME_BUILD_TESTS should be independent in each module
authormpa <mpa@opencascade.com>
Wed, 23 Oct 2013 05:31:45 +0000 (05:31 +0000)
committermpa <mpa@opencascade.com>
Wed, 23 Oct 2013 05:31:45 +0000 (05:31 +0000)
- Add definitions and include directories of dependent modules

CMakeLists.txt
SalomeHOMARDConfig.cmake.in

index 26c64f86ae89b78d3d989f4f68e35b4e1323b753..d96492d8db41d9c29480b7c2199c741c754dbedd 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 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()
 
index 360b11527757dd608ed1d60e147ea89f57eed706..8e57d60bab496de623c96cbfb2fb7be697f7ee2f 100644 (file)
@@ -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@")