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
7 ###############################################################
8 # Copyright (C) 2007-2022 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 SIERPINSKYEngine AND NOT @PROJECT_NAME@_BINARY_DIR)
34 INCLUDE("@PACKAGE_SALOME_INSTALL_CMAKE_LOCAL@/@PROJECT_NAME@Targets.cmake")
38 SET_AND_CHECK(SIERPINSKY_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
41 SET_AND_CHECK(SIERPINSKY_INCLUDE_DIRS "${SIERPINSKY_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
42 SET(SIERPINSKY_INCLUDE_DIRS "${SIERPINSKY_INCLUDE_DIRS};@_SalomeSIERPINSKY_EXTRA_HEADERS@")
43 SET(SIERPINSKY_DEFINITIONS "@SMESH_DEFINITIONS@")
45 # Package specific environment variables
46 @_SalomeSIERPINSKY_EXTRA_ENV_FULL@
48 #### Now the specificities
50 # Options exported by the package:
51 SET(SALOME_SIERPINSKY_BUILD_TESTS @SALOME_BUILD_TESTS@)
52 #SET(SALOME_SIERPINSKY_BUILD_DOC @SALOME_BUILD_DOC@)
53 SET(SALOME_SIERPINSKY_USE_LIBGD @SALOME_SIERPINSKY_USE_LIBGD@)
55 # Level 1 prerequisites:
56 SET_AND_CHECK(SMESH_ROOT_DIR_EXP "@PACKAGE_SMESH_ROOT_DIR@")
57 SET_AND_CHECK(RANDOMIZER_ROOT_DIR_EXP "@PACKAGE_RANDOMIZER_ROOT_DIR@")
58 IF(SALOME_SIERPINSKY_USE_LIBGD)
59 SET_AND_CHECK(LIBGD_ROOT_DIR_EXP "@PACKAGE_LIBGD_ROOT_DIR@")
60 LIST(APPEND SIERPINSKY_DEFINITIONS "-DWITH_LIBGD")
63 # For all prerequisites, load the corresponding targets if the package was used
64 # in CONFIG mode. This ensures dependent projects link correctly
65 # without having to set LD_LIBRARY_PATH:
66 SET(_PREREQ_@PROJECT_NAME@ @_PREREQ_LIST@)
67 SET(_PREREQ_@PROJECT_NAME@_CONFIG_DIR @_PREREQ_DIR_LIST@)
68 SET(_PREREQ_@PROJECT_NAME@_COMPONENTS "@_PREREQ_COMPO_LIST@")
69 LIST(LENGTH _PREREQ_@PROJECT_NAME@_CONFIG_DIR _list_len_@PROJECT_NAME@)
70 IF(NOT _list_len_@PROJECT_NAME@ EQUAL 0)
71 # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
72 MATH(EXPR _range_@PROJECT_NAME@ "${_list_len_@PROJECT_NAME@}-1")
73 FOREACH(_p_@PROJECT_NAME@ RANGE ${_range_@PROJECT_NAME@})
74 LIST(GET _PREREQ_@PROJECT_NAME@ ${_p_@PROJECT_NAME@} _pkg_@PROJECT_NAME@ )
75 LIST(GET _PREREQ_@PROJECT_NAME@_CONFIG_DIR ${_p_@PROJECT_NAME@} _pkg_dir_@PROJECT_NAME@)
76 LIST(GET _PREREQ_@PROJECT_NAME@_COMPONENTS ${_p_@PROJECT_NAME@} _pkg_compo_@PROJECT_NAME@)
77 IF(NOT OMIT_DETECT_PACKAGE_${_pkg_@PROJECT_NAME@})
78 MESSAGE(STATUS "===> Reloading targets from ${_pkg_@PROJECT_NAME@} ...")
79 IF(NOT _pkg_compo_@PROJECT_NAME@)
80 FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
81 PATHS "${_pkg_dir_@PROJECT_NAME@}"
84 STRING(REPLACE "," ";" _compo_lst_@PROJECT_NAME@ "${_pkg_compo_@PROJECT_NAME@}")
85 MESSAGE(STATUS "===> (components: ${_pkg_compo_@PROJECT_NAME@})")
86 FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
87 COMPONENTS ${_compo_lst_@PROJECT_NAME@}
88 PATHS "${_pkg_dir_@PROJECT_NAME@}"
95 # Installation directories
96 SET(SALOME_INSTALL_BINS "@SALOME_INSTALL_BINS@")
97 SET(SALOME_INSTALL_LIBS "@SALOME_INSTALL_LIBS@")
98 SET(SALOME_INSTALL_IDLS "@SALOME_INSTALL_IDLS@")
99 SET(SALOME_INSTALL_HEADERS "@SALOME_INSTALL_HEADERS@")
100 SET(SALOME_INSTALL_SCRIPT_SCRIPTS "@SALOME_INSTALL_SCRIPT_SCRIPTS@")
101 SET(SALOME_INSTALL_SCRIPT_DATA "@SALOME_INSTALL_SCRIPT_DATA@")
102 SET(SALOME_INSTALL_SCRIPT_PYTHON "@SALOME_INSTALL_SCRIPT_PYTHON@")
103 SET(SALOME_INSTALL_APPLISKEL_SCRIPTS "@SALOME_INSTALL_APPLISKEL_SCRIPTS@")
104 SET(SALOME_INSTALL_APPLISKEL_PYTHON "@SALOME_INSTALL_APPLISKEL_PYTHON@")
105 SET(SALOME_INSTALL_CMAKE_LOCAL "@SALOME_INSTALL_CMAKE_LOCAL@")
106 SET(SALOME_INSTALL_PYTHON "@SALOME_INSTALL_PYTHON@")
107 SET(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@")
108 SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@")
109 SET(SALOME_INSTALL_DOC "@SALOME_INSTALL_DOC@")
110 SET(SALOME_INSTALL_AMCONFIG_LOCAL "@SALOME_INSTALL_AMCONFIG_LOCAL@")
112 # Include SMESH targets if they were not already loaded:
113 IF(NOT (TARGET SMESHEngine))
114 INCLUDE("${SMESH_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE}/SalomeSMESHTargets.cmake")
117 # Include RANDOMIZER targets if they were not already loaded:
118 IF(NOT (TARGET SalomeIDLRANDOMIZER))
119 INCLUDE("${RANDOMIZER_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE}/SalomeRANDOMIZERTargets.cmake")
122 # Exposed SIERPINSKY targets:
123 SET(SIERPINSKY_SIERPINSKYEngine SIERPINSKYEngine)
124 SET(SIERPINSKY_SIERPINSKY SIERPINSKY)
125 SET(SIERPINSKY_SalomeIDLSIERPINSKY SalomeIDLSIERPINSKY)