]> SALOME platform Git repositories - samples/pyhello.git/blob - SalomePYHELLOConfig.cmake.in
Salome HOME
8fed6b2bfb5f7b40f4ffbe762e4a4b5e2baabe4c
[samples/pyhello.git] / SalomePYHELLOConfig.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-2016  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, or (at your option) any later version.
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 email : webmaster.salome@opencascade.com
28 #
29
30 ### Initialisation performed by CONFIGURE_PACKAGE_CONFIG_FILE:
31 @PACKAGE_INIT@
32
33
34 # Package root dir:
35 SET_AND_CHECK(PYHELLO_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
36
37 # Include directories
38 SET_AND_CHECK(PYHELLO_INCLUDE_DIRS "${PYHELLO_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
39 SET(PYHELLO_INCLUDE_DIRS "${PYHELLO_INCLUDE_DIRS};@_SalomePYHELLO_EXTRA_HEADERS@")
40 SET(PYHELLO_DEFINITIONS "@GUI_DEFINITIONS@")
41
42 # Package specific environment variables
43 @_SalomePYHELLO_EXTRA_ENV_FULL@
44
45 # Load the dependencies for the libraries of @PROJECT_NAME@ 
46 # (contains definitions for IMPORTED targets). This is only 
47 # imported if we are not built as a subproject (in this case targets are already there)
48 IF(NOT TARGET SalomeIDLPYHELLO AND NOT @PROJECT_NAME@_BINARY_DIR)
49   INCLUDE("${PYHELLO_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE_LOCAL}/SalomePYHELLOTargets.cmake")
50 ENDIF()   
51
52 #### Now the specificities
53
54 # Options exported by the package:
55 SET(SALOME_PYHELLO_BUILD_TESTS @SALOME_BUILD_TESTS@)
56 SET(SALOME_PYHELLO_BUILD_DOC   @SALOME_BUILD_DOC@)
57
58 # Level 1 prerequisites:
59 SET_AND_CHECK(GUI_ROOT_DIR_EXP "@PACKAGE_GUI_ROOT_DIR@")
60
61 # For all prerequisites, load the corresponding targets if the package was used
62 # in CONFIG mode. This ensures dependent projects link correctly
63 # without having to set LD_LIBRARY_PATH:
64 SET(_PREREQ_@PROJECT_NAME@ @_PREREQ_LIST@)
65 SET(_PREREQ_@PROJECT_NAME@_CONFIG_DIR @_PREREQ_DIR_LIST@)
66 SET(_PREREQ_@PROJECT_NAME@_COMPONENTS "@_PREREQ_COMPO_LIST@")
67 LIST(LENGTH _PREREQ_@PROJECT_NAME@_CONFIG_DIR _list_len_@PROJECT_NAME@)
68 IF(NOT _list_len_@PROJECT_NAME@ EQUAL 0)
69   # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
70   MATH(EXPR _range_@PROJECT_NAME@ "${_list_len_@PROJECT_NAME@}-1")
71   FOREACH(_p_@PROJECT_NAME@ RANGE ${_range_@PROJECT_NAME@})
72     LIST(GET _PREREQ_@PROJECT_NAME@            ${_p_@PROJECT_NAME@} _pkg_@PROJECT_NAME@    )
73     LIST(GET _PREREQ_@PROJECT_NAME@_CONFIG_DIR ${_p_@PROJECT_NAME@} _pkg_dir_@PROJECT_NAME@)
74     LIST(GET _PREREQ_@PROJECT_NAME@_COMPONENTS ${_p_@PROJECT_NAME@} _pkg_compo_@PROJECT_NAME@)
75     IF(NOT OMIT_DETECT_PACKAGE_${_pkg_@PROJECT_NAME@})
76       MESSAGE(STATUS "===> Reloading targets from ${_pkg_@PROJECT_NAME@} ...")
77       IF(NOT _pkg_compo_@PROJECT_NAME@)
78         FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
79             PATHS "${_pkg_dir_@PROJECT_NAME@}"
80             NO_DEFAULT_PATH)
81       ELSE()
82         STRING(REPLACE "," ";" _compo_lst_@PROJECT_NAME@ "${_pkg_compo_@PROJECT_NAME@}")
83         MESSAGE(STATUS "===> (components: ${_pkg_compo_@PROJECT_NAME@})")
84         FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
85             COMPONENTS ${_compo_lst_@PROJECT_NAME@}
86             PATHS "${_pkg_dir_@PROJECT_NAME@}"
87             NO_DEFAULT_PATH)
88       ENDIF()
89     ENDIF()
90   ENDFOREACH()
91 ENDIF()
92
93 # Installation directories
94 SET(SALOME_INSTALL_BINS "@SALOME_INSTALL_BINS@")
95 SET(SALOME_INSTALL_LIBS "@SALOME_INSTALL_LIBS@")
96 SET(SALOME_INSTALL_IDLS "@SALOME_INSTALL_IDLS@")
97 SET(SALOME_INSTALL_HEADERS "@SALOME_INSTALL_HEADERS@")
98 SET(SALOME_INSTALL_SCRIPT_SCRIPTS "@SALOME_INSTALL_SCRIPT_SCRIPTS@")
99 SET(SALOME_INSTALL_SCRIPT_DATA "@SALOME_INSTALL_SCRIPT_DATA@")
100 SET(SALOME_INSTALL_SCRIPT_PYTHON "@SALOME_INSTALL_SCRIPT_PYTHON@")
101 SET(SALOME_INSTALL_APPLISKEL_SCRIPTS "@SALOME_INSTALL_APPLISKEL_SCRIPTS@")
102 SET(SALOME_INSTALL_APPLISKEL_PYTHON "@SALOME_INSTALL_APPLISKEL_PYTHON@") 
103 SET(SALOME_INSTALL_CMAKE_LOCAL "@SALOME_INSTALL_CMAKE_LOCAL@")
104 SET(SALOME_INSTALL_PYTHON "@SALOME_INSTALL_PYTHON@")
105 SET(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@")
106 SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@")
107 SET(SALOME_INSTALL_DOC "@SALOME_INSTALL_DOC@")
108 SET(SALOME_INSTALL_AMCONFIG_LOCAL "@SALOME_INSTALL_AMCONFIG_LOCAL@")
109
110 # Include GUI targets if they were not already loaded:
111 IF(NOT (TARGET Event)) 
112   INCLUDE("${GUI_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE}/SalomeGUITargets.cmake")
113 ENDIF()
114
115 # Exposed PYHELLO targets:
116 SET(PYHELLO_SalomeIDLPYHELLO SalomeIDLPYHELLO)