]> SALOME platform Git repositories - modules/paravis.git/blob - src/Plugins/MEDWriter/MEDWriterConfig.cmake.in
Salome HOME
Switch development flag to 1
[modules/paravis.git] / src / Plugins / MEDWriter / MEDWriterConfig.cmake.in
1 ###############################################################
2 # Copyright (C) 2017  CEA/DEN, EDF R&D
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 @PACKAGE_INIT@
22
23 # Load the dependencies for the libraries of @PROJECT_NAME@ 
24 # (contains definitions for IMPORTED targets). This is only 
25 # imported if we are not built as a subproject (in this case targets are already there)
26 INCLUDE("@PROJECT_NAME@Targets")
27
28 # Package root dir:
29 SET_AND_CHECK(MEDWRITER_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
30
31 # Include directories and definitions
32 SET_AND_CHECK(MEDWRITER_INCLUDE_DIRS "${MEDWRITER_ROOT_DIR_EXP}/@MEDWRITER_INSTALL_HEADERS@")
33
34
35 # For all prerequisites, load the corresponding targets if the package was used
36 # in CONFIG mode. This ensures dependent projects link correctly
37 # without having to set LD_LIBRARY_PATH:
38 SET(_PREREQ_@PROJECT_NAME@ @_PREREQ_LIST@)
39 SET(_PREREQ_@PROJECT_NAME@_CONFIG_DIR @_PREREQ_DIR_LIST@)
40 SET(_PREREQ_@PROJECT_NAME@_COMPONENTS "@_PREREQ_COMPO_LIST@")
41 LIST(LENGTH _PREREQ_@PROJECT_NAME@_CONFIG_DIR _list_len_@PROJECT_NAME@)
42 IF(NOT _list_len_@PROJECT_NAME@ EQUAL 0)
43   # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
44   MATH(EXPR _range_@PROJECT_NAME@ "${_list_len_@PROJECT_NAME@}-1")
45   FOREACH(_p_@PROJECT_NAME@ RANGE ${_range_@PROJECT_NAME@})
46     LIST(GET _PREREQ_@PROJECT_NAME@            ${_p_@PROJECT_NAME@} _pkg_@PROJECT_NAME@    )
47     LIST(GET _PREREQ_@PROJECT_NAME@_CONFIG_DIR ${_p_@PROJECT_NAME@} _pkg_dir_@PROJECT_NAME@)
48     LIST(GET _PREREQ_@PROJECT_NAME@_COMPONENTS ${_p_@PROJECT_NAME@} _pkg_compo_@PROJECT_NAME@)
49     IF(NOT OMIT_DETECT_PACKAGE_${_pkg_@PROJECT_NAME@})
50       MESSAGE(STATUS "===> Reloading targets from ${_pkg_@PROJECT_NAME@} ...")
51       IF(NOT _pkg_compo_@PROJECT_NAME@)
52         FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
53             PATHS "${_pkg_dir_@PROJECT_NAME@}"
54             NO_DEFAULT_PATH)
55       ELSE()
56         STRING(REPLACE "," ";" _compo_lst_@PROJECT_NAME@ "${_pkg_compo_@PROJECT_NAME@}")
57         MESSAGE(STATUS "===> (components: ${_pkg_compo_@PROJECT_NAME@})")
58         FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
59             COMPONENTS ${_compo_lst_@PROJECT_NAME@}
60             PATHS "${_pkg_dir_@PROJECT_NAME@}"
61             NO_DEFAULT_PATH)
62       ENDIF()
63     ENDIF()
64   ENDFOREACH()
65 ENDIF()