Salome HOME
Bug fix: findCellIdsOnBoundary() wrongly throwing if void mesh.
[tools/medcoupling.git] / MEDCouplingConfig.cmake.in
1 # - Config file for the @PROJECT_NAME@ package
2 # It defines the following variables. 
3 # Specific to the package @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-2022  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 medcouplingcpp AND NOT @PROJECT_NAME@_BINARY_DIR)
34   INCLUDE("@PACKAGE_MEDCOUPLING_INSTALL_CMAKE_LOCAL@/@PROJECT_NAME@Targets.cmake")
35 ENDIF()   
36
37 # Package root dir:
38 SET_AND_CHECK(MEDCOUPLING_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
39
40 # Include directories and definitions
41 SET_AND_CHECK(MEDCOUPLING_INCLUDE_DIRS "${MEDCOUPLING_ROOT_DIR_EXP}/@MEDCOUPLING_INSTALL_HEADERS@")
42 SET(MEDCOUPLING_INCLUDE_DIRS "${MEDCOUPLING_INCLUDE_DIRS};@_MEDCoupling_EXTRA_HEADERS@")
43 SET(MEDCOUPLING_DEFINITIONS)
44
45 # Package specific environment variables
46 @_MEDCoupling_EXTRA_ENV_FULL@
47
48 #### Now the specificities
49
50 # Options exported by the package:
51 SET(MEDCOUPLING_MICROMED       @MEDCOUPLING_MICROMED@)
52 SET(MEDCOUPLING_ENABLE_PYTHON  @MEDCOUPLING_ENABLE_PYTHON@)
53 SET(MEDCOUPLING_USE_MPI            @MEDCOUPLING_USE_MPI@)
54 SET(MEDCOUPLING_BUILD_DOC      @MEDCOUPLING_BUILD_DOC@)
55 SET(MEDCOUPLING_BUILD_TESTS    @MEDCOUPLING_BUILD_TESTS@)
56 SET(MEDCOUPLING_BUILD_GUI      @MEDCOUPLING_BUILD_GUI@)
57 SET(MEDCOUPLING_USE_64BIT_IDS  @MEDCOUPLING_USE_64BIT_IDS@)
58
59 # Advanced options
60
61 # Level 1 prerequisites:
62
63 # Optional level 1 prerequisites:
64
65 IF(NOT MEDCOUPLING_MICROMED)
66   SET_AND_CHECK(MEDFILE_ROOT_DIR_EXP "@PACKAGE_MEDFILE_ROOT_DIR@")
67 ENDIF()
68
69 # For all prerequisites, load the corresponding targets if the package was used
70 # in CONFIG mode. This ensures dependent projects link correctly
71 # without having to set LD_LIBRARY_PATH:
72 SET(_PREREQ_@PROJECT_NAME@ @_PREREQ_LIST@)
73 SET(_PREREQ_@PROJECT_NAME@_CONFIG_DIR @_PREREQ_DIR_LIST@)
74 SET(_PREREQ_@PROJECT_NAME@_COMPONENTS "@_PREREQ_COMPO_LIST@")
75 LIST(LENGTH _PREREQ_@PROJECT_NAME@_CONFIG_DIR _list_len_@PROJECT_NAME@)
76 IF(NOT _list_len_@PROJECT_NAME@ EQUAL 0)
77   # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
78   MATH(EXPR _range_@PROJECT_NAME@ "${_list_len_@PROJECT_NAME@}-1")
79   FOREACH(_p_@PROJECT_NAME@ RANGE ${_range_@PROJECT_NAME@})
80     LIST(GET _PREREQ_@PROJECT_NAME@            ${_p_@PROJECT_NAME@} _pkg_@PROJECT_NAME@    )
81     LIST(GET _PREREQ_@PROJECT_NAME@_CONFIG_DIR ${_p_@PROJECT_NAME@} _pkg_dir_@PROJECT_NAME@)
82     LIST(GET _PREREQ_@PROJECT_NAME@_COMPONENTS ${_p_@PROJECT_NAME@} _pkg_compo_@PROJECT_NAME@)
83     IF(NOT OMIT_DETECT_PACKAGE_${_pkg_@PROJECT_NAME@})
84       MESSAGE(STATUS "===> Reloading targets from ${_pkg_@PROJECT_NAME@} ...")
85       IF(NOT _pkg_compo_@PROJECT_NAME@)
86         FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
87             PATHS "${_pkg_dir_@PROJECT_NAME@}"
88             NO_DEFAULT_PATH)
89       ELSE()
90         STRING(REPLACE "," ";" _compo_lst_@PROJECT_NAME@ "${_pkg_compo_@PROJECT_NAME@}")
91         MESSAGE(STATUS "===> (components: ${_pkg_compo_@PROJECT_NAME@})")
92         FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
93             COMPONENTS ${_compo_lst_@PROJECT_NAME@}
94             PATHS "${_pkg_dir_@PROJECT_NAME@}"
95             NO_DEFAULT_PATH)
96       ENDIF()
97     ENDIF()
98   ENDFOREACH()
99 ENDIF()
100
101 # Installation directories
102 SET(MEDCOUPLING_INSTALL_BINS "@MEDCOUPLING_INSTALL_BINS@")
103 SET(MEDCOUPLING_INSTALL_LIBS "@MEDCOUPLING_INSTALL_BINS@")
104 SET(MEDCOUPLING_INSTALL_HEADERS "@MEDCOUPLING_INSTALL_BINS@")
105 SET(MEDCOUPLING_INSTALL_SCRIPT_SCRIPTS "@MEDCOUPLING_INSTALL_BINS@")
106 SET(MEDCOUPLING_INSTALL_TESTS "@MEDCOUPLING_INSTALL_BINS@")
107 SET(MEDCOUPLING_INSTALL_SCRIPT_PYTHON "@MEDCOUPLING_INSTALL_BINS@")
108 SET(MEDCOUPLING_INSTALL_CMAKE_LOCAL "@MEDCOUPLING_INSTALL_BINS@")
109 IF(MEDCOUPLING_ENABLE_PYTHON)
110   SET(MEDCOUPLING_INSTALL_PYTHON "@MEDCOUPLING_INSTALL_BINS@")
111   SET(MEDCOUPLING_INSTALL_PYTHON_SHARED "@MEDCOUPLING_INSTALL_BINS@")
112 ENDIF(MEDCOUPLING_ENABLE_PYTHON)
113 SET(MEDCOUPLING_INSTALL_RES "@MEDCOUPLING_INSTALL_BINS@")
114 SET(MEDCOUPLING_INSTALL_DOC "@MEDCOUPLING_INSTALL_BINS@")
115
116 # Exposed MEDCoupling targets:
117 SET(MEDCoupling_interpkernel interpkernel)
118 SET(MEDCoupling_medcouplingcpp medcouplingcpp)
119 SET(MEDCoupling_medcoupling    medcouplingcpp)
120 SET(MEDCoupling_medicoco    medicoco)
121 SET(MEDCoupling_medcouplingremapper medcouplingremapper)
122 SET(MEDCoupling_medloader medloader)
123 SET(MEDCoupling_renumbercpp renumbercpp)
124 SET(MEDCoupling_medpartitionercpp medpartitionercpp)
125 SET(MEDCoupling_MEDPARTITIONERTest MEDPARTITIONERTest)
126 SET(MEDCoupling_InterpKernelTest InterpKernelTest)
127 SET(MEDCoupling_paramedmem paramedmem)
128 SET(MEDCoupling_paramedloader paramedloader)
129 SET(MEDCoupling_paramedmemcompo paramedmemcompo)
130 SET(MEDCoupling_ParaMEDMEMTest ParaMEDMEMTest)
131 SET(MEDCoupling_medcouplingclient medcouplingclient)