]> SALOME platform Git repositories - modules/kernel.git/blob - SalomeKERNELConfig.cmake.in
Salome HOME
Porting to ParaView 4.1: udpated list of required VTK modules in FindSalomeVTK module.
[modules/kernel.git] / SalomeKERNELConfig.cmake.in
1 # - Config file for the @PROJECT_NAME@ package
2 # It defines the following variables. 
3 # Specific to the pacakge @PROJECT_NAME@ itself:
4 #  @PROJECT_NAME_UC@_ROOT_DIR_EXP - the root path of the installation providing this CMake file
5 #
6 # Other stuff specific to this package:
7 #  SALOME_USE_MPI            - ON if KERNEL is built with MPI support
8 #  SALOME_KERNEL_BUILD_DOC   - ON if documentation for KERNEL module has been built
9 #  SALOME_KERNEL_BUILD_TESTS - ON if tests for KERNEL module has been built
10 #  SALOME_LIGHT_ONLY         - ON if SALOME is built in Light mode (no CORBA)
11
12 ###############################################################
13 #  Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
14 #
15 #  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
16 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
17 #
18 #  This library is free software; you can redistribute it and/or
19 #  modify it under the terms of the GNU Lesser General Public
20 #  License as published by the Free Software Foundation; either
21 #  version 2.1 of the License.
22 #
23 #  This library is distributed in the hope that it will be useful,
24 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
25 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
26 #  Lesser General Public License for more details.
27 #
28 #  You should have received a copy of the GNU Lesser General Public
29 #  License along with this library; if not, write to the Free Software
30 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
31 #
32 #  See http://www.salome-platform.org/ or
33 #  email : webmaster.salome@opencascade.com
34 ###############################################################
35
36 ### Initialisation performed by CONFIGURE_PACKAGE_CONFIG_FILE:
37 @PACKAGE_INIT@
38
39 # Load the dependencies for the libraries of @PROJECT_NAME@ 
40 # (contains definitions for IMPORTED targets). This is only 
41 # imported if we are not built as a subproject (in this case targets are already there)
42 IF(NOT TARGET SALOMEBasics AND NOT @PROJECT_NAME@_BINARY_DIR)
43   INCLUDE("@PACKAGE_SALOME_INSTALL_CMAKE@/@PROJECT_NAME@Targets.cmake")
44 ENDIF()   
45
46 # Package root dir:
47 SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
48
49 # Include directories and definitions
50 SET_AND_CHECK(KERNEL_INCLUDE_DIRS "${KERNEL_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
51 SET(KERNEL_INCLUDE_DIRS "${KERNEL_INCLUDE_DIRS};@_SalomeKERNEL_EXTRA_HEADERS@")
52 SET(KERNEL_DEFINITIONS)
53
54 # Package specific environment variables
55 @_SalomeKERNEL_EXTRA_ENV_FULL@
56
57 #### Now the specificities
58
59 # Options exported by the package:
60 SET(SALOME_USE_MPI     @SALOME_USE_MPI@)
61 IF(SALOME_USE_MPI)
62   LIST(APPEND KERNEL_INCLUDE_DIRS "@MPI_INCLUDE_DIRS@")
63   LIST(APPEND KERNEL_DEFINITIONS "@MPI_DEFINITIONS@")
64 ENDIF()
65
66 SET(SALOME_KERNEL_BUILD_DOC     @SALOME_BUILD_DOC@)
67 SET(SALOME_KERNEL_BUILD_TESTS   @SALOME_BUILD_TESTS@)
68 SET(SALOME_LIGHT_ONLY    @SALOME_LIGHT_ONLY@)
69 SET(SALOME_USE_LIBBATCH  @SALOME_USE_LIBBATCH@)
70
71 SET(SALOME_USE_SIMAN     @SALOME_USE_SIMAN@)
72 IF(SALOME_USE_SIMAN)
73   LIST(APPEND KERNEL_DEFINITIONS "-DWITH_SIMANIO")
74 ENDIF()
75
76 SET(SALOME_USE_PORTMANAGER     @SALOME_USE_PORTMANAGER@)
77 IF(SALOME_USE_PORTMANAGER)
78   LIST(APPEND KERNEL_DEFINITIONS "-DWITH_PORTMANAGER")
79 ENDIF()
80
81 # Prerequisites:
82 IF(SALOME_KERNEL_BUILD_TESTS)
83   SET_AND_CHECK(CPPUNIT_ROOT_DIR_EXP  "@PACKAGE_CPPUNIT_ROOT_DIR@")
84 ENDIF()
85 IF(SALOME_KERNEL_BUILD_DOC)
86   SET_AND_CHECK(GRAPHVIZ_ROOT_DIR_EXP "@PACKAGE_GRAPHVIZ_ROOT_DIR@")
87   SET_AND_CHECK(DOXYGEN_ROOT_DIR_EXP  "@PACKAGE_DOXYGEN_ROOT_DIR@")
88   SET_AND_CHECK(SPHINX_ROOT_DIR_EXP   "@PACKAGE_SPHINX_ROOT_DIR@")
89 ENDIF()
90 IF(SALOME_USE_MPI)
91   SET_AND_CHECK(MPI_ROOT_DIR_EXP      "@PACKAGE_MPI_ROOT_DIR@")
92 ENDIF()
93 IF(NOT SALOME_LIGHT_ONLY)
94   SET_AND_CHECK(OMNIORB_ROOT_DIR_EXP  "@PACKAGE_OMNIORB_ROOT_DIR@")
95   SET_AND_CHECK(OMNIORBPY_ROOT_DIR_EXP "@PACKAGE_OMNIORBPY_ROOT_DIR@")
96 ENDIF()
97 IF(SALOME_USE_LIBBATCH)
98   SET_AND_CHECK(LIBBATCH_ROOT_DIR_EXP "@PACKAGE_LIBBATCH_ROOT_DIR@")
99 ENDIF()
100 IF(SALOME_USE_SIMAN)
101   SET_AND_CHECK(SIMANIO_ROOT_DIR_EXP "@PACKAGE_SIMANIO_ROOT_DIR@")
102 ENDIF()
103
104 SET_AND_CHECK(PTHREAD_ROOT_DIR_EXP  "@PACKAGE_PTHREAD_ROOT_DIR@")
105 SET_AND_CHECK(HDF5_ROOT_DIR_EXP     "@PACKAGE_HDF5_ROOT_DIR@")
106 SET_AND_CHECK(LIBXML2_ROOT_DIR_EXP  "@PACKAGE_LIBXML2_ROOT_DIR@")
107 SET_AND_CHECK(PYTHON_ROOT_DIR_EXP   "@PACKAGE_PYTHON_ROOT_DIR@")
108 SET_AND_CHECK(SWIG_ROOT_DIR_EXP     "@PACKAGE_SWIG_ROOT_DIR@")
109
110 # For all prerequisites, load the corresponding targets if the package was used 
111 # in CONFIG mode. This ensures dependent projects link correctly
112 # without having to set LD_LIBRARY_PATH:
113 SET(_PREREQ @_PREREQ_LIST@)
114 SET(_PREREQ_CONFIG_DIR @_PREREQ_DIR_LIST@)
115 SET(_PREREQ_COMPONENTS "@_PREREQ_COMPO_LIST@")
116 LIST(LENGTH _PREREQ_CONFIG_DIR _list_len)
117 IF(NOT _list_len EQUAL 0)
118   # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
119   MATH(EXPR _range "${_list_len}-1")
120   FOREACH(_p RANGE ${_range})  
121     LIST(GET _PREREQ            ${_p} _pkg    )
122     LIST(GET _PREREQ_CONFIG_DIR ${_p} _pkg_dir)
123     LIST(GET _PREREQ_COMPONENTS ${_p} _pkg_compo)
124     MESSAGE(STATUS "===> Reloading targets from ${_pkg} ...")
125     IF(NOT _pkg_compo)
126       FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE 
127           PATHS "${_pkg_dir}" 
128           NO_DEFAULT_PATH)
129     ELSE()
130       STRING(REPLACE "," ";" _compo_lst "${_pkg_compo}")
131       MESSAGE(STATUS "===> (components: ${_pkg_compo})")
132       FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE
133           COMPONENTS ${_compo_lst} 
134           PATHS "${_pkg_dir}"
135           NO_DEFAULT_PATH)
136     ENDIF()
137   ENDFOREACH()
138 ENDIF()
139
140 # Installation directories
141 SET(SALOME_INSTALL_BINS "@SALOME_INSTALL_BINS@")
142 SET(SALOME_INSTALL_LIBS "@SALOME_INSTALL_LIBS@")
143 SET(SALOME_INSTALL_IDLS "@SALOME_INSTALL_IDLS@")
144 SET(SALOME_INSTALL_HEADERS "@SALOME_INSTALL_HEADERS@")
145 SET(SALOME_INSTALL_SCRIPT_SCRIPTS "@SALOME_INSTALL_SCRIPT_SCRIPTS@")
146 SET(SALOME_INSTALL_SCRIPT_DATA "@SALOME_INSTALL_SCRIPT_DATA@")
147 SET(SALOME_INSTALL_SCRIPT_PYTHON "@SALOME_INSTALL_SCRIPT_PYTHON@")
148 SET(SALOME_INSTALL_APPLISKEL_SCRIPTS "@SALOME_INSTALL_APPLISKEL_SCRIPTS@")
149 SET(SALOME_INSTALL_APPLISKEL_PYTHON "@SALOME_INSTALL_APPLISKEL_PYTHON@") 
150 SET(SALOME_INSTALL_CMAKE "@SALOME_INSTALL_CMAKE@")
151 SET(SALOME_INSTALL_CMAKE_LOCAL "@SALOME_INSTALL_CMAKE_LOCAL@")
152 SET(SALOME_INSTALL_PYTHON "@SALOME_INSTALL_PYTHON@")
153 SET(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@")
154 SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@")
155 SET(SALOME_INSTALL_DOC "@SALOME_INSTALL_DOC@")
156 SET(SALOME_INSTALL_AMCONFIG "@SALOME_INSTALL_AMCONFIG@") # to be removed
157 SET(SALOME_INSTALL_AMCONFIG_LOCAL "@SALOME_INSTALL_AMCONFIG_LOCAL@") # to be removed
158
159 # Exposed targets:
160 SET(KERNEL_CalciumC CalciumC)
161 SET(KERNEL_DF DF)
162 SET(KERNEL_Launcher Launcher)
163 SET(KERNEL_LifeCycleCORBATest LifeCycleCORBATest)
164 SET(KERNEL_NamingServiceTest NamingServiceTest)
165 SET(KERNEL_OpUtil OpUtil)
166 SET(KERNEL_Registry Registry)
167 SET(KERNEL_ResourcesManager ResourcesManager)
168 SET(KERNEL_SALOMEBasics SALOMEBasics)
169 SET(KERNEL_SalomeCatalog SalomeCatalog)
170 SET(KERNEL_SalomeCommunication SalomeCommunication)
171 SET(KERNEL_SalomeContainer SalomeContainer)
172 SET(KERNEL_SalomeDatastream SalomeDatastream)
173 SET(KERNEL_SalomeDSCContainer SalomeDSCContainer)
174 SET(KERNEL_SalomeDSClient SalomeDSClient)
175 SET(KERNEL_SalomeDSCSupervBasic SalomeDSCSupervBasic)
176 SET(KERNEL_SalomeDSCSuperv SalomeDSCSuperv)
177 SET(KERNEL_SalomeDSImpl SalomeDSImpl)
178 SET(KERNEL_SALOMEDSImplTest SALOMEDSImplTest)
179 SET(KERNEL_SalomeDS SalomeDS)
180 SET(KERNEL_SALOMEDSTest SALOMEDSTest)
181 SET(KERNEL_SalomeGenericObj SalomeGenericObj)
182 SET(KERNEL_SalomeHDFPersist SalomeHDFPersist)
183 SET(KERNEL_SalomeIDLKernel SalomeIDLKernel)
184 SET(KERNEL_SalomeLauncher SalomeLauncher)
185 SET(KERNEL_SalomeLifeCycleCORBA SalomeLifeCycleCORBA)
186 SET(KERNEL_SALOMELocalTrace SALOMELocalTrace)
187 SET(KERNEL_SALOMELocalTraceTest SALOMELocalTraceTest)
188 SET(KERNEL_SalomeLoggerServer SalomeLoggerServer)
189 SET(KERNEL_SalomeMPIContainer SalomeMPIContainer)
190 SET(KERNEL_SalomeNotification SalomeNotification)
191 SET(KERNEL_SalomeNS SalomeNS)
192 SET(KERNEL_SalomeResourcesManager SalomeResourcesManager)
193 SET(KERNEL_SalomeTestComponentEngine SalomeTestComponentEngine)
194 SET(KERNEL_SalomeTestMPIComponentEngine SalomeTestMPIComponentEngine)
195 SET(KERNEL_SALOMETraceCollectorTest SALOMETraceCollectorTest)
196 SET(KERNEL_TOOLSDS TOOLSDS)
197 SET(KERNEL_UtilsTest UtilsTest)
198 SET(KERNEL_with_loggerTraceCollector with_loggerTraceCollector)
199 SET(KERNEL_SalomeKernelHelpers SalomeKernelHelpers)