1 # - Config file for the @PROJECT_NAME@ package
2 # It defines the following variables.
3 # Specific to the package @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-2016 CEA/DEN, EDF R&D, OPEN CASCADE
10 # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
11 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
27 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
30 ### Initialisation performed by CONFIGURE_PACKAGE_CONFIG_FILE:
33 # Load the dependencies for the libraries of @PROJECT_NAME@
34 # (contains definitions for IMPORTED targets). This is only
35 # imported if we are not built as a subproject (in this case targets are already there)
36 IF(NOT TARGET SMESHEngine AND NOT @PROJECT_NAME@_BINARY_DIR)
37 INCLUDE("@PACKAGE_SALOME_INSTALL_CMAKE_LOCAL@/@PROJECT_NAME@Targets.cmake")
41 SET_AND_CHECK(SMESH_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
44 SET_AND_CHECK(SMESH_INCLUDE_DIRS "${SMESH_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
45 SET(SMESH_INCLUDE_DIRS "${SMESH_INCLUDE_DIRS};@_SalomeSMESH_EXTRA_HEADERS@")
46 SET(SMESH_DEFINITIONS "@GEOM_DEFINITIONS@")
48 # Package specific environment variables
49 @_SalomeSMESH_EXTRA_ENV_FULL@
51 #### Now the specificities
53 # Options exported by the package:
54 SET(SALOME_SMESH_BUILD_DOC @SALOME_BUILD_DOC@)
55 SET(SALOME_SMESH_BUILD_TESTS @SALOME_BUILD_TESTS@)
58 SET(SALOME_SMESH_BUILD_GUI @SALOME_BUILD_GUI@)
59 SET(SALOME_SMESH_USE_CGNS @SALOME_SMESH_USE_CGNS@)
60 SET(SALOME_SMESH_USE_TBB @SALOME_SMESH_USE_TBB@)
61 SET(SALOME_SMESH_ENABLE_MEFISTO @SALOME_SMESH_ENABLE_MEFISTO@)
63 LIST(APPEND SMESH_DEFINITIONS "-DENABLE_MEFISTO")
66 # Level 1 prerequisites:
67 SET_AND_CHECK(GEOM_ROOT_DIR_EXP "@PACKAGE_GEOM_ROOT_DIR@")
68 SET_AND_CHECK(MEDFILE_ROOT_DIR_EXP "@PACKAGE_MEDFILE_ROOT_DIR@")
70 # Optional level 1 prerequisites:
71 IF(SALOME_SMESH_USE_CGNS)
72 SET_AND_CHECK(CGNS_ROOT_DIR_EXP "@PACKAGE_CGNS_ROOT_DIR@")
74 IF(SALOME_SMESH_USE_TBB)
75 SET_AND_CHECK(TBB_ROOT_DIR_EXP "@PACKAGE_TBB_ROOT_DIR@")
78 # For all prerequisites, load the corresponding targets if the package was used
79 # in CONFIG mode. This ensures dependent projects link correctly
80 # without having to set LD_LIBRARY_PATH:
81 SET(_PREREQ_@PROJECT_NAME@ @_PREREQ_LIST@)
82 SET(_PREREQ_@PROJECT_NAME@_CONFIG_DIR @_PREREQ_DIR_LIST@)
83 SET(_PREREQ_@PROJECT_NAME@_COMPONENTS "@_PREREQ_COMPO_LIST@")
84 LIST(LENGTH _PREREQ_@PROJECT_NAME@_CONFIG_DIR _list_len_@PROJECT_NAME@)
85 IF(NOT _list_len_@PROJECT_NAME@ EQUAL 0)
86 # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
87 MATH(EXPR _range_@PROJECT_NAME@ "${_list_len_@PROJECT_NAME@}-1")
88 FOREACH(_p_@PROJECT_NAME@ RANGE ${_range_@PROJECT_NAME@})
89 LIST(GET _PREREQ_@PROJECT_NAME@ ${_p_@PROJECT_NAME@} _pkg_@PROJECT_NAME@ )
90 LIST(GET _PREREQ_@PROJECT_NAME@_CONFIG_DIR ${_p_@PROJECT_NAME@} _pkg_dir_@PROJECT_NAME@)
91 LIST(GET _PREREQ_@PROJECT_NAME@_COMPONENTS ${_p_@PROJECT_NAME@} _pkg_compo_@PROJECT_NAME@)
92 IF(NOT OMIT_DETECT_PACKAGE_${_pkg_@PROJECT_NAME@})
93 MESSAGE(STATUS "===> Reloading targets from ${_pkg_@PROJECT_NAME@} ...")
94 IF(NOT _pkg_compo_@PROJECT_NAME@)
95 FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
96 PATHS "${_pkg_dir_@PROJECT_NAME@}"
99 STRING(REPLACE "," ";" _compo_lst_@PROJECT_NAME@ "${_pkg_compo_@PROJECT_NAME@}")
100 MESSAGE(STATUS "===> (components: ${_pkg_compo_@PROJECT_NAME@})")
101 FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
102 COMPONENTS ${_compo_lst_@PROJECT_NAME@}
103 PATHS "${_pkg_dir_@PROJECT_NAME@}"
110 # Installation directories
111 SET(SALOME_INSTALL_BINS "@SALOME_INSTALL_BINS@")
112 SET(SALOME_INSTALL_LIBS "@SALOME_INSTALL_LIBS@")
113 SET(SALOME_INSTALL_IDLS "@SALOME_INSTALL_IDLS@")
114 SET(SALOME_INSTALL_HEADERS "@SALOME_INSTALL_HEADERS@")
115 SET(SALOME_INSTALL_SCRIPT_SCRIPTS "@SALOME_INSTALL_SCRIPT_SCRIPTS@")
116 SET(SALOME_INSTALL_SCRIPT_DATA "@SALOME_INSTALL_SCRIPT_DATA@")
117 SET(SALOME_INSTALL_SCRIPT_PYTHON "@SALOME_INSTALL_SCRIPT_PYTHON@")
118 SET(SALOME_INSTALL_APPLISKEL_SCRIPTS "@SALOME_INSTALL_APPLISKEL_SCRIPTS@")
119 SET(SALOME_INSTALL_APPLISKEL_PYTHON "@SALOME_INSTALL_APPLISKEL_PYTHON@")
120 SET(SALOME_INSTALL_CMAKE_LOCAL "@SALOME_INSTALL_CMAKE_LOCAL@")
121 SET(SALOME_INSTALL_PYTHON "@SALOME_INSTALL_PYTHON@")
122 SET(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@")
123 SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@")
124 SET(SALOME_INSTALL_DOC "@SALOME_INSTALL_DOC@")
125 SET(SALOME_INSTALL_AMCONFIG_LOCAL "@SALOME_INSTALL_AMCONFIG_LOCAL@")
127 # Include GEOM targets if they were not already loaded:
128 IF(NOT (TARGET GEOMbasic))
129 INCLUDE("${GEOM_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE_LOCAL}/SalomeGEOMTargets.cmake")
130 ENDIF(NOT (TARGET GEOMbasic))
132 # Exposed SMESH targets:
133 SET(SMESH_SMESHControls SMESHControls)
134 SET(SMESH_MeshDriver MeshDriver)
135 SET(SMESH_MeshDriverCGNS MeshDriverCGNS)
136 SET(SMESH_MeshDriverDAT MeshDriverDAT)
137 SET(SMESH_MeshDriverGMF MeshDriverGMF)
138 SET(SMESH_MeshDriverMED MeshDriverMED)
139 SET(SMESH_MeshDriverSTL MeshDriverSTL)
140 SET(SMESH_MeshDriverUNV MeshDriverUNV)
141 SET(SMESH_MEDWrapper MEDWrapper)
142 IF(SALOME_SMESH_ENABLE_MEFISTO)
143 SET(SMESH_MEFISTO2D MEFISTO2D)
144 ENDIF(SALOME_SMESH_ENABLE_MEFISTO)
145 SET(SMESH_SMESHObject SMESHObject)
146 SET(SMESH_PluginUtils PluginUtils)
148 SET(SMESH_SMESHimpl SMESHimpl)
149 SET(SMESH_SMESHEngine SMESHEngine)
150 SET(SMESH_SMESHClient SMESHClient)
151 SET(SMESH_SMESHDS SMESHDS)
152 SET(SMESH_SMESHFiltersSelection SMESHFiltersSelection)
153 SET(SMESH_SMESH SMESH)
154 SET(SMESH_SMESHUtils SMESHUtils)
155 SET(SMESH_StdMeshers StdMeshers)
156 SET(SMESH_StdMeshersEngine StdMeshersEngine)
157 SET(SMESH_StdMeshersGUI StdMeshersGUI)
158 SET(SMESH_MeshJobManagerEngine MeshJobManagerEngine)
159 SET(SMESH_SPADDERPluginTesterEngine SPADDERPluginTesterEngine)
160 SET(SMESH_SalomeIDLSMESH SalomeIDLSMESH)
161 SET(SMESH_SalomeIDLSPADDER SalomeIDLSPADDER)