]> SALOME platform Git repositories - modules/eficas.git/blob - SalomeEFICASConfig.cmake.in
Salome HOME
Correction encoding fichiers
[modules/eficas.git] / SalomeEFICASConfig.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) 2001-2017  EDF R&D
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 # Package root dir:
31 SET_AND_CHECK(EFICAS_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
32
33 # Include directories
34 SET_AND_CHECK(EFICAS_INCLUDE_DIRS "${EFICAS_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
35 SET(EFICAS_INCLUDE_DIRS "${EFICAS_INCLUDE_DIRS};@_SalomeEFICAS_EXTRA_HEADERS@")
36 SET(EFICAS_DEFINITIONS "@KERNEL_DEFINITIONS@ @GUI_DEFINITIONS@")
37
38 # Package specific environment variables
39 @_SalomeEFICAS_EXTRA_ENV_FULL@
40
41 # Load the dependencies for the libraries of @PROJECT_NAME@ 
42 # (contains definitions for IMPORTED targets). This is only 
43 # imported if we are not built as a subproject (in this case targets are already there)
44 IF(NOT TARGET SalomeIDLEFICAS AND NOT @PROJECT_NAME@_BINARY_DIR)
45   INCLUDE("${EFICAS_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE_LOCAL}/SalomeEFICASTargets.cmake")
46 ENDIF()   
47
48 #### Now the specificities
49
50 # Options exported by the package:
51 SET(SALOME_EFICAS_BUILD_TESTS @SALOME_BUILD_TESTS@)
52 SET(SALOME_EFICAS_BUILD_DOC   @SALOME_BUILD_DOC@)
53
54 # Level 1 prerequisites:
55 SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_KERNEL_ROOT_DIR@")
56 SET_AND_CHECK(GUI_ROOT_DIR_EXP "@PACKAGE_GUI_ROOT_DIR@")
57
58 # For all prerequisites, load the corresponding targets if the package was used
59 # in CONFIG mode. This ensures dependent projects link correctly
60 # without having to set LD_LIBRARY_PATH:
61 SET(_PREREQ_@PROJECT_NAME@ @_PREREQ_LIST@)
62 SET(_PREREQ_@PROJECT_NAME@_CONFIG_DIR @_PREREQ_DIR_LIST@)
63 SET(_PREREQ_@PROJECT_NAME@_COMPONENTS "@_PREREQ_COMPO_LIST@")
64 LIST(LENGTH _PREREQ_@PROJECT_NAME@_CONFIG_DIR _list_len_@PROJECT_NAME@)
65 IF(NOT _list_len_@PROJECT_NAME@ EQUAL 0)
66   # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
67   MATH(EXPR _range_@PROJECT_NAME@ "${_list_len_@PROJECT_NAME@}-1")
68   FOREACH(_p_@PROJECT_NAME@ RANGE ${_range_@PROJECT_NAME@})
69     LIST(GET _PREREQ_@PROJECT_NAME@            ${_p_@PROJECT_NAME@} _pkg_@PROJECT_NAME@    )
70     LIST(GET _PREREQ_@PROJECT_NAME@_CONFIG_DIR ${_p_@PROJECT_NAME@} _pkg_dir_@PROJECT_NAME@)
71     LIST(GET _PREREQ_@PROJECT_NAME@_COMPONENTS ${_p_@PROJECT_NAME@} _pkg_compo_@PROJECT_NAME@)
72     IF(NOT OMIT_DETECT_PACKAGE_${_pkg_@PROJECT_NAME@})
73       MESSAGE(STATUS "===> Reloading targets from ${_pkg_@PROJECT_NAME@} ...")
74       IF(NOT _pkg_compo_@PROJECT_NAME@)
75         FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
76             PATHS "${_pkg_dir_@PROJECT_NAME@}"
77             NO_DEFAULT_PATH)
78       ELSE()
79         STRING(REPLACE "," ";" _compo_lst_@PROJECT_NAME@ "${_pkg_compo_@PROJECT_NAME@}")
80         MESSAGE(STATUS "===> (components: ${_pkg_compo_@PROJECT_NAME@})")
81         FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
82             COMPONENTS ${_compo_lst_@PROJECT_NAME@}
83             PATHS "${_pkg_dir_@PROJECT_NAME@}"
84             NO_DEFAULT_PATH)
85       ENDIF()
86     ENDIF()
87   ENDFOREACH()
88 ENDIF()
89
90 # Installation directories
91 SET(SALOME_INSTALL_BINS "@SALOME_INSTALL_BINS@")
92 SET(SALOME_INSTALL_LIBS "@SALOME_INSTALL_LIBS@")
93 SET(SALOME_INSTALL_IDLS "@SALOME_INSTALL_IDLS@")
94 SET(SALOME_INSTALL_HEADERS "@SALOME_INSTALL_HEADERS@")
95 SET(SALOME_INSTALL_SCRIPT_SCRIPTS "@SALOME_INSTALL_SCRIPT_SCRIPTS@")
96 SET(SALOME_INSTALL_SCRIPT_DATA "@SALOME_INSTALL_SCRIPT_DATA@")
97 SET(SALOME_INSTALL_SCRIPT_PYTHON "@SALOME_INSTALL_SCRIPT_PYTHON@")
98 SET(SALOME_INSTALL_CMAKE_LOCAL "@SALOME_INSTALL_CMAKE_LOCAL@")
99 SET(SALOME_INSTALL_PYTHON "@SALOME_INSTALL_PYTHON@")
100 SET(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@")
101 SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@")
102 SET(SALOME_INSTALL_DOC "@SALOME_INSTALL_DOC@")
103
104 # Include GUI targets if they were not already loaded:
105 IF(NOT (TARGET Event)) 
106   INCLUDE("${GUI_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE}/SalomeGUITargets.cmake")
107 ENDIF()
108
109 # Exposed EFICAS targets:
110 SET(EFICAS_SalomeIDLEFICAS SalomeIDLEFICAS)