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
7 ###############################################################
8 # Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
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.
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.
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
24 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
27 ### Initialisation performed by CONFIGURE_PACKAGE_CONFIG_FILE:
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")
38 SET_AND_CHECK(MEDCOUPLING_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
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)
45 # Package specific environment variables
46 @_MEDCoupling_EXTRA_ENV_FULL@
48 #### Now the specificities
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@)
60 # Level 1 prerequisites:
62 # Optional level 1 prerequisites:
64 IF(NOT MEDCOUPLING_MICROMED)
65 SET_AND_CHECK(MEDFILE_ROOT_DIR_EXP "@PACKAGE_MEDFILE_ROOT_DIR@")
68 # For all prerequisites, load the corresponding targets if the package was used
69 # in CONFIG mode. This ensures dependent projects link correctly
70 # without having to set LD_LIBRARY_PATH:
71 SET(_PREREQ_@PROJECT_NAME@ @_PREREQ_LIST@)
72 SET(_PREREQ_@PROJECT_NAME@_CONFIG_DIR @_PREREQ_DIR_LIST@)
73 SET(_PREREQ_@PROJECT_NAME@_COMPONENTS "@_PREREQ_COMPO_LIST@")
74 LIST(LENGTH _PREREQ_@PROJECT_NAME@_CONFIG_DIR _list_len_@PROJECT_NAME@)
75 IF(NOT _list_len_@PROJECT_NAME@ EQUAL 0)
76 # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
77 MATH(EXPR _range_@PROJECT_NAME@ "${_list_len_@PROJECT_NAME@}-1")
78 FOREACH(_p_@PROJECT_NAME@ RANGE ${_range_@PROJECT_NAME@})
79 LIST(GET _PREREQ_@PROJECT_NAME@ ${_p_@PROJECT_NAME@} _pkg_@PROJECT_NAME@ )
80 LIST(GET _PREREQ_@PROJECT_NAME@_CONFIG_DIR ${_p_@PROJECT_NAME@} _pkg_dir_@PROJECT_NAME@)
81 LIST(GET _PREREQ_@PROJECT_NAME@_COMPONENTS ${_p_@PROJECT_NAME@} _pkg_compo_@PROJECT_NAME@)
82 IF(NOT OMIT_DETECT_PACKAGE_${_pkg_@PROJECT_NAME@})
83 MESSAGE(STATUS "===> Reloading targets from ${_pkg_@PROJECT_NAME@} ...")
84 IF(NOT _pkg_compo_@PROJECT_NAME@)
85 FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
86 PATHS "${_pkg_dir_@PROJECT_NAME@}"
89 STRING(REPLACE "," ";" _compo_lst_@PROJECT_NAME@ "${_pkg_compo_@PROJECT_NAME@}")
90 MESSAGE(STATUS "===> (components: ${_pkg_compo_@PROJECT_NAME@})")
91 FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
92 COMPONENTS ${_compo_lst_@PROJECT_NAME@}
93 PATHS "${_pkg_dir_@PROJECT_NAME@}"
100 # Installation directories
101 SET(MEDCOUPLING_INSTALL_BINS "@MEDCOUPLING_INSTALL_BINS@")
102 SET(MEDCOUPLING_INSTALL_LIBS "@MEDCOUPLING_INSTALL_BINS@")
103 SET(MEDCOUPLING_INSTALL_HEADERS "@MEDCOUPLING_INSTALL_BINS@")
104 SET(MEDCOUPLING_INSTALL_SCRIPT_SCRIPTS "@MEDCOUPLING_INSTALL_BINS@")
105 SET(MEDCOUPLING_INSTALL_TESTS "@MEDCOUPLING_INSTALL_BINS@")
106 SET(MEDCOUPLING_INSTALL_SCRIPT_PYTHON "@MEDCOUPLING_INSTALL_BINS@")
107 SET(MEDCOUPLING_INSTALL_CMAKE_LOCAL "@MEDCOUPLING_INSTALL_BINS@")
108 IF(MEDCOUPLING_ENABLE_PYTHON)
109 SET(MEDCOUPLING_INSTALL_PYTHON "@MEDCOUPLING_INSTALL_BINS@")
110 SET(MEDCOUPLING_INSTALL_PYTHON_SHARED "@MEDCOUPLING_INSTALL_BINS@")
111 ENDIF(MEDCOUPLING_ENABLE_PYTHON)
112 SET(MEDCOUPLING_INSTALL_RES "@MEDCOUPLING_INSTALL_BINS@")
113 SET(MEDCOUPLING_INSTALL_DOC "@MEDCOUPLING_INSTALL_BINS@")
115 # Exposed MEDCoupling targets:
116 SET(MEDCoupling_interpkernel interpkernel)
117 SET(MEDCoupling_medcouplingcpp medcouplingcpp)
118 SET(MEDCoupling_medcoupling medcouplingcpp)
119 SET(MEDCoupling_medcouplingremapper medcouplingremapper)
120 SET(MEDCoupling_medloader medloader)
121 SET(MEDCoupling_renumbercpp renumbercpp)
122 SET(MEDCoupling_medpartitionercpp medpartitionercpp)
123 SET(MEDCoupling_MEDPARTITIONERTest MEDPARTITIONERTest)
124 SET(MEDCoupling_InterpKernelTest InterpKernelTest)
125 SET(MEDCoupling_paramedmem paramedmem)
126 SET(MEDCoupling_paramedloader paramedloader)
127 SET(MEDCoupling_paramedmemcompo paramedmemcompo)
128 SET(MEDCoupling_ParaMEDMEMTest ParaMEDMEMTest)
129 SET(MEDCoupling_medcouplingclient medcouplingclient)