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
7 ###############################################################
8 # Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
10 # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
11 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
13 # This library is free software; you can redistribute it and/or
14 # modify it under the terms of the GNU Lesser General Public
15 # License as published by the Free Software Foundation; either
16 # version 2.1 of the License.
18 # This library is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 # Lesser General Public License for more details.
23 # You should have received a copy of the GNU Lesser General Public
24 # License along with this library; if not, write to the Free Software
25 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 # See http://www.salome-platform.org/ or
28 # email : webmaster.salome@opencascade.com
29 ###############################################################
31 ### Initialisation performed by CONFIGURE_PACKAGE_CONFIG_FILE:
34 # Load the dependencies for the libraries of @PROJECT_NAME@
35 # (contains definitions for IMPORTED targets). This is only
36 # imported if we are not built as a subproject (in this case targets are already there)
37 IF(NOT TARGET medcoupling AND NOT @PROJECT_NAME@_BINARY_DIR)
38 INCLUDE("@PACKAGE_SALOME_INSTALL_CMAKE_LOCAL@/@PROJECT_NAME@Targets.cmake")
42 SET_AND_CHECK(MED_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
44 # Include directories and definitions
45 SET_AND_CHECK(MED_INCLUDE_DIRS "${MED_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
46 SET(MED_INCLUDE_DIRS "${MED_INCLUDE_DIRS};@_SalomeMED_EXTRA_HEADERS@")
49 # Package specific environment variables
50 @_SalomeMED_EXTRA_ENV_FULL@
52 #### Now the specificities
54 # Options exported by the package:
55 SET(SALOME_MED_STANDALONE @SALOME_MED_STANDALONE@)
56 SET(SALOME_MED_MICROMED @SALOME_MED_MICROMED@)
57 SET(SALOME_MED_ENABLE_PYTHON @SALOME_MED_ENABLE_PYTHON@)
58 SET(SALOME_USE_MPI @SALOME_USE_MPI@)
59 SET(SALOME_MED_BUILD_DOC @SALOME_BUILD_DOC@)
60 SET(SALOME_MED_BUILD_TESTS @SALOME_BUILD_TESTS@)
61 SET(SALOME_MED_BUILD_GUI @SALOME_BUILD_GUI@)
65 # Level 1 prerequisites:
67 # Optional level 1 prerequisites:
69 IF(NOT SALOME_MED_MICROMED)
70 SET_AND_CHECK(MEDFILE_ROOT_DIR_EXP "@PACKAGE_MEDFILE_ROOT_DIR@")
71 ENDIF(NOT SALOME_MED_MICROMED)
73 IF(NOT SALOME_MED_STANDALONE)
74 SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_KERNEL_ROOT_DIR@")
75 LIST(APPEND MED_DEFINITIONS "@KERNEL_DEFINITIONS@")
76 ENDIF(NOT SALOME_MED_STANDALONE)
77 IF(SALOME_MED_BUILD_GUI)
78 SET_AND_CHECK(GUI_ROOT_DIR_EXP "@PACKAGE_GUI_ROOT_DIR@")
79 LIST(APPEND MED_DEFINITIONS "@GUI_DEFINITIONS@")
80 ENDIF(SALOME_MED_BUILD_GUI)
82 # For all prerequisites, load the corresponding targets if the package was used
83 # in CONFIG mode. This ensures dependent projects link correctly
84 # without having to set LD_LIBRARY_PATH.
85 # Many of them will be automatically loaded from KERNEL or GUI:
87 SET(_PREREQ Metis ParMetis Scotch XDR CAS Qt4 CppUnit Graphviz Doxygen Sphinx MPI omniORB
88 PThread Boost libXml2 Python HDF5 MEDFile)
89 SET(_PREREQ_CONFIG_DIR "@Metis_DIR@" "@ParMetis_DIR@" "@Scotch_DIR@" "@XDR_DIR@" "@CAS_DIR@" "@Qt4_DIR@"
90 "@CppUnit_DIR@" "@Graphviz_DIR@" "@Doxygen_DIR@" "@Sphinx_DIR@" "@MPI_DIR@"
91 "@omniORB_DIR@" "@PThread_DIR@" "@Boost_DIR@" "@libXml2_DIR@"
92 "@Python_DIR@" "@HDF5_DIR@" "@MEDFile_DIR@")
94 LIST(LENGTH _PREREQ_CONFIG_DIR _list_len)
95 # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
96 MATH(EXPR _range "${_list_len}-1")
97 FOREACH(_p RANGE ${_range})
98 LIST(GET _PREREQ ${_p} _pkg )
99 LIST(GET _PREREQ_CONFIG_DIR ${_p} _pkg_dir)
101 MESSAGE(STATUS "===> Reloading targets from ${_pkg} ...")
102 FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE
108 # Installation directories
109 SET(SALOME_INSTALL_BINS "@SALOME_INSTALL_BINS@")
110 SET(SALOME_INSTALL_LIBS "@SALOME_INSTALL_LIBS@")
111 SET(SALOME_INSTALL_IDLS "@SALOME_INSTALL_IDLS@")
112 SET(SALOME_INSTALL_HEADERS "@SALOME_INSTALL_HEADERS@")
113 SET(SALOME_INSTALL_SCRIPT_SCRIPTS "@SALOME_INSTALL_SCRIPT_SCRIPTS@")
114 SET(SALOME_INSTALL_SCRIPT_DATA "@SALOME_INSTALL_SCRIPT_DATA@")
115 SET(SALOME_INSTALL_SCRIPT_PYTHON "@SALOME_INSTALL_SCRIPT_PYTHON@")
116 SET(SALOME_INSTALL_APPLISKEL_SCRIPTS "@SALOME_INSTALL_APPLISKEL_SCRIPTS@")
117 SET(SALOME_INSTALL_APPLISKEL_PYTHON "@SALOME_INSTALL_APPLISKEL_PYTHON@")
118 SET(SALOME_INSTALL_CMAKE "@SALOME_INSTALL_CMAKE@")
119 SET(SALOME_INSTALL_CMAKE_LOCAL "@SALOME_INSTALL_CMAKE_LOCAL@")
120 SET(SALOME_INSTALL_PYTHON "@SALOME_INSTALL_PYTHON@")
121 SET(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@")
122 SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@")
124 IF(SALOME_MED_BUILD_GUI)
125 # Include GUI targets if they were not already loaded:
126 IF(NOT (TARGET Event))
127 INCLUDE("${GUI_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE_LOCAL}/SalomeGUITargets.cmake")
129 ELSE(SALOME_MED_BUILD_GUI)
130 IF(NOT SALOME_MED_STANDALONE)
131 # Include KERNEL targets if they were not already loaded:
132 IF(NOT (TARGET SALOMEBasics) AND NOT SALOME_MED_STANDALONE)
133 INCLUDE("${KERNEL_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE}/SalomeKERNELTargets.cmake")
135 ENDIF(NOT SALOME_MED_STANDALONE)
136 ENDIF(SALOME_MED_BUILD_GUI)
138 # Exposed MED targets:
139 SET(MED_interpkernel interpkernel)
140 SET(MED_medcoupling medcoupling)
141 SET(MED_medcouplingremapper medcouplingremapper)
142 SET(MED_medloader medloader)
143 SET(MED_paramedmem paramedmem)
144 SET(MED_paramedloader paramedloader)
145 SET(MED_SalomeIDLMED SalomeIDLMED)
146 SET(MED_medcouplingcorba medcouplingcorba)
147 SET(MED_medcouplingclient medcouplingclient)