]> SALOME platform Git repositories - samples/pycalculator.git/blob - SalomePYCALCULATORConfig.cmake.in
Salome HOME
CMake: doing proper string comparison in IF clause
[samples/pycalculator.git] / SalomePYCALCULATORConfig.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) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
9 #
10 #  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
11 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
12 #
13 #  This library is free software; you can redistribute it and/or
14 #  modify it under the terms of the GNU Lesser General Public
15 #  License as published by the Free Software Foundation; either
16 #  version 2.1 of the License.
17 #
18 #  This library is distributed in the hope that it will be useful,
19 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
20 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21 #  Lesser General Public License for more details.
22 #
23 #  You should have received a copy of the GNU Lesser General Public
24 #  License along with this library; if not, write to the Free Software
25 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
26 #
27 #  See http://www.salome-platform.org/ or
28 #  email : webmaster.salome@opencascade.com
29 ###############################################################
30
31 ### Initialisation performed by CONFIGURE_PACKAGE_CONFIG_FILE:
32 @PACKAGE_INIT@
33
34
35 # Package root dir:
36 SET_AND_CHECK(PYCALCULATOR_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
37
38 # Include directories
39 SET_AND_CHECK(PYCALCULATOR_INCLUDE_DIRS "${PYCALCULATOR_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
40 SET(PYCALCULATOR_INCLUDE_DIRS "${PYCALCULATOR_INCLUDE_DIRS};@_SalomePYCALCULATOR_EXTRA_HEADERS@")
41 SET(PYCALCULATOR_DEFINITIONS "@MED_DEFINITIONS@")
42
43 # Load the dependencies for the libraries of @PROJECT_NAME@ 
44 # (contains definitions for IMPORTED targets). This is only 
45 # imported if we are not built as a subproject (in this case targets are already there)
46 IF(NOT TARGET SalomeIDLPYCALCULATOR AND NOT @PROJECT_NAME@_BINARY_DIR)
47   INCLUDE("${PYCALCULATOR_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE_LOCAL}/SalomePYCALCULATORTargets.cmake")
48 ENDIF()
49
50 #### Now the specificities
51
52 # Options exported by the package:
53 #SET(SALOME_PYCALCULATOR_BUILD_TESTS @SALOME_BUILD_TESTS@)
54 SET(SALOME_PYCALCULATOR_BUILD_DOC   @SALOME_BUILD_DOC@)
55
56 # Level 1 prerequisites:
57 SET_AND_CHECK(MED_ROOT_DIR_EXP  "@PACKAGE_MED_ROOT_DIR@")
58
59 # For all prerequisites, load the corresponding targets if the package was used 
60 # in CONFIG mode. This ensures dependent projects link correctly
61 # without having to set LD_LIBRARY_PATH:
62 SET(_PREREQ)
63 SET(_PREREQ_CONFIG_DIR)
64 LIST(LENGTH _PREREQ_CONFIG_DIR _list_len)
65 # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
66 MATH(EXPR _range "${_list_len}-1")
67 FOREACH(_p RANGE ${_range})  
68   LIST(GET _PREREQ            ${_p} _pkg    )
69   LIST(GET _PREREQ_CONFIG_DIR ${_p} _pkg_dir)
70   IF(NOT _pkg_dir STREQUAL "")
71      MESSAGE(STATUS "===> Reloading targets from ${_pkg} ...")
72      FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE 
73           PATHS "${_pkg_dir}" 
74           NO_DEFAULT_PATH)
75   ENDIF()
76 ENDFOREACH()
77
78 # Installation directories
79 SET(SALOME_INSTALL_BINS "@SALOME_INSTALL_BINS@")
80 SET(SALOME_INSTALL_LIBS "@SALOME_INSTALL_LIBS@")
81 SET(SALOME_INSTALL_IDLS "@SALOME_INSTALL_IDLS@")
82 SET(SALOME_INSTALL_HEADERS "@SALOME_INSTALL_HEADERS@")
83 SET(SALOME_INSTALL_SCRIPT_SCRIPTS "@SALOME_INSTALL_SCRIPT_SCRIPTS@")
84 SET(SALOME_INSTALL_SCRIPT_DATA "@SALOME_INSTALL_SCRIPT_DATA@")
85 SET(SALOME_INSTALL_SCRIPT_PYTHON "@SALOME_INSTALL_SCRIPT_PYTHON@")
86 SET(SALOME_INSTALL_APPLISKEL_SCRIPTS "@SALOME_INSTALL_APPLISKEL_SCRIPTS@")
87 SET(SALOME_INSTALL_APPLISKEL_PYTHON "@SALOME_INSTALL_APPLISKEL_PYTHON@") 
88 SET(SALOME_INSTALL_CMAKE_LOCAL "@SALOME_INSTALL_CMAKE_LOCAL@")
89 SET(SALOME_INSTALL_PYTHON "@SALOME_INSTALL_PYTHON@")
90 SET(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@")
91 SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@")
92 SET(SALOME_INSTALL_DOC "@SALOME_INSTALL_DOC@")
93 SET(SALOME_INSTALL_AMCONFIG_LOCAL "@SALOME_INSTALL_AMCONFIG_LOCAL@")
94
95 # Include MED targets if they were not already loaded:
96 IF(NOT (TARGET medcoupling))
97   INCLUDE("${MED_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE}/SalomeMEDTargets.cmake")
98 ENDIF()
99
100 # Exposed PYCALCULATOR targets:
101 SET(PYCALCULATOR_SalomeIDLPYCALCULATOR SalomeIDLPYCALCULATOR)