Salome HOME
fix conflict
[modules/med.git] / SalomeMEDConfig.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
7 ###############################################################
8 # Copyright (C) 2013-2015  CEA/DEN, EDF R&D, OPEN CASCADE
9 #
10 # This library is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU Lesser General Public
12 # License as published by the Free Software Foundation; either
13 # version 2.1 of the License, or (at your option) any later version.
14 #
15 # This library is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 # Lesser General Public License for more details.
19 #
20 # You should have received a copy of the GNU Lesser General Public
21 # License along with this library; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
23 #
24 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
25 #
26
27 ### Initialisation performed by CONFIGURE_PACKAGE_CONFIG_FILE:
28 @PACKAGE_INIT@
29
30 # Load the dependencies for the libraries of @PROJECT_NAME@
31 # (contains definitions for IMPORTED targets). This is only
32 # imported if we are not built as a subproject (in this case targets are already there)
33 IF(NOT TARGET medcoupling AND NOT @PROJECT_NAME@_BINARY_DIR)
34   INCLUDE("@PACKAGE_SALOME_INSTALL_CMAKE_LOCAL@/@PROJECT_NAME@Targets.cmake")
35 ENDIF()
36
37 # Package root dir:
38 SET_AND_CHECK(MED_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
39
40 # Include directories and definitions
41 SET_AND_CHECK(MED_INCLUDE_DIRS "${MED_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
42 SET(MED_INCLUDE_DIRS "${MED_INCLUDE_DIRS};@_SalomeMED_EXTRA_HEADERS@")
43 SET(MED_DEFINITIONS)
44
45 # Package specific environment variables
46 @_SalomeMED_EXTRA_ENV_FULL@
47
48 #### Now the specificities
49
50 # Options exported by the package:
51 SET(SALOME_MED_ENABLE_PYTHON  @SALOME_MED_ENABLE_PYTHON@)
52 SET(SALOME_USE_MPI            @SALOME_USE_MPI@)
53 SET(SALOME_MED_BUILD_DOC      @SALOME_BUILD_DOC@)
54 SET(SALOME_MED_BUILD_TESTS    @SALOME_BUILD_TESTS@)
55 SET(SALOME_MED_BUILD_GUI      @SALOME_BUILD_GUI@)
56
57 # Advanced options
58
59 # Level 1 prerequisites:
60
61 # Optional level 1 prerequisites:
62
63 SET_AND_CHECK(MEDFILE_ROOT_DIR_EXP "@PACKAGE_MEDFILE_ROOT_DIR@")
64
65 SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_KERNEL_ROOT_DIR@")
66 LIST(APPEND MED_DEFINITIONS "@KERNEL_DEFINITIONS@")
67 IF(SALOME_MED_BUILD_GUI)
68   SET_AND_CHECK(GUI_ROOT_DIR_EXP "@PACKAGE_GUI_ROOT_DIR@")
69   LIST(APPEND MED_DEFINITIONS "@GUI_DEFINITIONS@")
70 ENDIF(SALOME_MED_BUILD_GUI)
71
72 # For all prerequisites, load the corresponding targets if the package was used
73 # in CONFIG mode. This ensures dependent projects link correctly
74 # without having to set LD_LIBRARY_PATH:
75 SET(_PREREQ @_PREREQ_LIST@)
76 SET(_PREREQ_CONFIG_DIR @_PREREQ_DIR_LIST@)
77 SET(_PREREQ_COMPONENTS "@_PREREQ_COMPO_LIST@")
78 LIST(LENGTH _PREREQ_CONFIG_DIR _list_len)
79 IF(NOT _list_len EQUAL 0)
80   # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
81   MATH(EXPR _range "${_list_len}-1")
82   FOREACH(_p RANGE ${_range})
83     LIST(GET _PREREQ            ${_p} _pkg    )
84     LIST(GET _PREREQ_CONFIG_DIR ${_p} _pkg_dir)
85     LIST(GET _PREREQ_COMPONENTS ${_p} _pkg_compo)
86     MESSAGE(STATUS "===> Reloading targets from ${_pkg} ...")
87     IF(NOT _pkg_compo)
88       FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE
89           PATHS "${_pkg_dir}"
90           NO_DEFAULT_PATH)
91     ELSE()
92       STRING(REPLACE "," ";" _compo_lst "${_pkg_compo}")
93       MESSAGE(STATUS "===> (components: ${_pkg_compo})")
94       FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE
95           COMPONENTS ${_compo_lst}
96           PATHS "${_pkg_dir}"
97           NO_DEFAULT_PATH)
98     ENDIF()
99   ENDFOREACH()
100 ENDIF()
101
102 # Installation directories
103 SET(SALOME_INSTALL_BINS "@SALOME_INSTALL_BINS@")
104 SET(SALOME_INSTALL_LIBS "@SALOME_INSTALL_LIBS@")
105 SET(SALOME_INSTALL_IDLS "@SALOME_INSTALL_IDLS@")
106 SET(SALOME_INSTALL_HEADERS "@SALOME_INSTALL_HEADERS@")
107 SET(SALOME_INSTALL_SCRIPT_SCRIPTS "@SALOME_INSTALL_SCRIPT_SCRIPTS@")
108 SET(SALOME_INSTALL_SCRIPT_DATA "@SALOME_INSTALL_SCRIPT_DATA@")
109 SET(SALOME_INSTALL_SCRIPT_PYTHON "@SALOME_INSTALL_SCRIPT_PYTHON@")
110 SET(SALOME_INSTALL_APPLISKEL_SCRIPTS "@SALOME_INSTALL_APPLISKEL_SCRIPTS@")
111 SET(SALOME_INSTALL_APPLISKEL_PYTHON "@SALOME_INSTALL_APPLISKEL_PYTHON@")
112 SET(SALOME_INSTALL_CMAKE "@SALOME_INSTALL_CMAKE@")
113 SET(SALOME_INSTALL_CMAKE_LOCAL "@SALOME_INSTALL_CMAKE_LOCAL@")
114 SET(SALOME_INSTALL_PYTHON "@SALOME_INSTALL_PYTHON@")
115 SET(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@")
116 SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@")
117
118 IF(SALOME_MED_BUILD_GUI)
119   # Include GUI targets if they were not already loaded:
120   INCLUDE("${GUI_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE_LOCAL}/SalomeGUITargets.cmake")
121 ELSE(SALOME_MED_BUILD_GUI)
122   # Include KERNEL targets if they were not already loaded:
123   IF(NOT (TARGET SALOMEBasics))
124     INCLUDE("${KERNEL_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE}/SalomeKERNELTargets.cmake")
125   ENDIF()
126 ENDIF(SALOME_MED_BUILD_GUI)
127
128 # Exposed MED targets:
129 # SET(MED_interpkernel interpkernel)
130 # SET(MED_medcoupling medcoupling)
131 # SET(MED_medcouplingremapper medcouplingremapper)
132 # SET(MED_medloader medloader)
133 # SET(MED_renumbercpp renumbercpp)
134 # SET(MED_medpartitionercpp medpartitionercpp)
135 # SET(MED_MEDPARTITIONERTest MEDPARTITIONERTest)
136 # SET(MED_InterpKernelTest InterpKernelTest)
137 # SET(MED_paramedmem paramedmem)
138 # SET(MED_paramedloader paramedloader)
139 # SET(MED_paramedcouplingcorba paramedcouplingcorba)
140 # SET(MED_paramedmemcompo paramedmemcompo)
141 # SET(MED_ParaMEDMEMTest ParaMEDMEMTest)
142 # SET(MED_SalomeIDLMED SalomeIDLMED)
143 # SET(MED_SalomeIDLMEDTests SalomeIDLMEDTests)
144 # SET(MED_medcouplingcorba medcouplingcorba)
145 # SET(MED_medcouplingclient medcouplingclient)
146 # SET(MED_medcalculator medcalculator)
147 # SET(MED_medcalculatorspython medcalculatorspython)
148 # SET(MED_MEDFactoryEngine MEDFactoryEngine)
149 # SET(MED_MEDCALCGUI_dialogs MEDCALCGUI_dialogs)
150 # SET(MED_MEDCALCGUI MEDCALCGUI)