]> SALOME platform Git repositories - modules/smesh.git/blob - SalomeSMESHConfig.cmake.in
Salome HOME
[bos #41978][EDF] Edit table of density on wire discretization. Load properly the...
[modules/smesh.git] / SalomeSMESHConfig.cmake.in
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
5 #
6
7 ###############################################################
8 # Copyright (C) 2007-2024  CEA, EDF, 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 # 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")
38 ENDIF()   
39
40 # Package root dir:
41 SET_AND_CHECK(SMESH_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
42
43 # Include directories
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@")
47
48 # Package specific environment variables
49 @_SalomeSMESH_EXTRA_ENV_FULL@
50
51 #### Now the specificities
52
53 # Options exported by the package:
54 SET(SALOME_SMESH_BUILD_DOC @SALOME_BUILD_DOC@)
55 SET(SALOME_SMESH_BUILD_TESTS @SALOME_BUILD_TESTS@)
56
57 # Advanced options
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_DISABLE_MG_ADAPT @SALOME_SMESH_DISABLE_MG_ADAPT@)
62 SET(SALOME_SMESH_DISABLE_HOMARD_ADAPT @SALOME_SMESH_DISABLE_HOMARD_ADAPT@)
63 IF(SALOME_SMESH_DISABLE_MG_ADAPT)
64   LIST(APPEND SMESH_DEFINITIONS "-DDISABLE_MG_ADAPT")
65 ENDIF()
66
67 # Level 1 prerequisites:
68 SET_AND_CHECK(GEOM_ROOT_DIR_EXP "@PACKAGE_GEOM_ROOT_DIR@")
69 SET_AND_CHECK(MEDFILE_ROOT_DIR_EXP "@PACKAGE_MEDFILE_ROOT_DIR@")
70
71 # Optional level 1 prerequisites:
72 IF(SALOME_SMESH_USE_CGNS)
73   SET_AND_CHECK(CGNS_ROOT_DIR_EXP "@PACKAGE_CGNS_ROOT_DIR@")
74 ENDIF()
75 IF(SALOME_SMESH_USE_TBB)
76   SET_AND_CHECK(TBB_ROOT_DIR_EXP "@PACKAGE_TBB_ROOT_DIR@")
77 ENDIF()
78
79 # For all prerequisites, load the corresponding targets if the package was used
80 # in CONFIG mode. This ensures dependent projects link correctly
81 # without having to set LD_LIBRARY_PATH:
82 SET(_PREREQ_@PROJECT_NAME@ @_PREREQ_LIST@)
83 SET(_PREREQ_@PROJECT_NAME@_CONFIG_DIR @_PREREQ_DIR_LIST@)
84 SET(_PREREQ_@PROJECT_NAME@_COMPONENTS "@_PREREQ_COMPO_LIST@")
85 LIST(LENGTH _PREREQ_@PROJECT_NAME@_CONFIG_DIR _list_len_@PROJECT_NAME@)
86 IF(NOT _list_len_@PROJECT_NAME@ EQUAL 0)
87   # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
88   MATH(EXPR _range_@PROJECT_NAME@ "${_list_len_@PROJECT_NAME@}-1")
89   FOREACH(_p_@PROJECT_NAME@ RANGE ${_range_@PROJECT_NAME@})
90     LIST(GET _PREREQ_@PROJECT_NAME@            ${_p_@PROJECT_NAME@} _pkg_@PROJECT_NAME@    )
91     LIST(GET _PREREQ_@PROJECT_NAME@_CONFIG_DIR ${_p_@PROJECT_NAME@} _pkg_dir_@PROJECT_NAME@)
92     LIST(GET _PREREQ_@PROJECT_NAME@_COMPONENTS ${_p_@PROJECT_NAME@} _pkg_compo_@PROJECT_NAME@)
93     IF(NOT OMIT_DETECT_PACKAGE_${_pkg_@PROJECT_NAME@})
94       MESSAGE(STATUS "===> Reloading targets from ${_pkg_@PROJECT_NAME@} ...")
95       IF(NOT _pkg_compo_@PROJECT_NAME@)
96         FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
97             PATHS "${_pkg_dir_@PROJECT_NAME@}"
98             NO_DEFAULT_PATH)
99       ELSE()
100         STRING(REPLACE "," ";" _compo_lst_@PROJECT_NAME@ "${_pkg_compo_@PROJECT_NAME@}")
101         MESSAGE(STATUS "===> (components: ${_pkg_compo_@PROJECT_NAME@})")
102         FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
103             COMPONENTS ${_compo_lst_@PROJECT_NAME@}
104             PATHS "${_pkg_dir_@PROJECT_NAME@}"
105             NO_DEFAULT_PATH)
106       ENDIF()
107     ENDIF()
108   ENDFOREACH()
109 ENDIF()
110
111 # Installation directories
112 SET(SALOME_INSTALL_BINS "@SALOME_INSTALL_BINS@")
113 SET(SALOME_INSTALL_LIBS "@SALOME_INSTALL_LIBS@")
114 SET(SALOME_INSTALL_IDLS "@SALOME_INSTALL_IDLS@")
115 SET(SALOME_INSTALL_HEADERS "@SALOME_INSTALL_HEADERS@")
116 SET(SALOME_INSTALL_SCRIPT_SCRIPTS "@SALOME_INSTALL_SCRIPT_SCRIPTS@")
117 SET(SALOME_INSTALL_SCRIPT_DATA "@SALOME_INSTALL_SCRIPT_DATA@")
118 SET(SALOME_INSTALL_SCRIPT_PYTHON "@SALOME_INSTALL_SCRIPT_PYTHON@")
119 SET(SALOME_INSTALL_APPLISKEL_SCRIPTS "@SALOME_INSTALL_APPLISKEL_SCRIPTS@")
120 SET(SALOME_INSTALL_APPLISKEL_PYTHON "@SALOME_INSTALL_APPLISKEL_PYTHON@") 
121 SET(SALOME_INSTALL_CMAKE_LOCAL "@SALOME_INSTALL_CMAKE_LOCAL@")
122 SET(SALOME_INSTALL_PYTHON "@SALOME_INSTALL_PYTHON@")
123 SET(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@")
124 SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@")
125 SET(SALOME_INSTALL_DOC "@SALOME_INSTALL_DOC@")
126 SET(SALOME_INSTALL_AMCONFIG_LOCAL "@SALOME_INSTALL_AMCONFIG_LOCAL@")
127 SET(SALOME_USE_64BIT_IDS  @SALOME_USE_64BIT_IDS@)
128
129 # Include GEOM targets if they were not already loaded:
130 IF(NOT (TARGET GEOMbasic))
131   INCLUDE("${GEOM_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE_LOCAL}/SalomeGEOMTargets.cmake")
132 ENDIF(NOT (TARGET GEOMbasic))
133
134 # Exposed SMESH targets:
135 SET(SMESH_SMESHControls SMESHControls)
136 SET(SMESH_MeshDriver MeshDriver)
137 SET(SMESH_MeshDriverCGNS MeshDriverCGNS)
138 SET(SMESH_MeshDriverDAT MeshDriverDAT)
139 SET(SMESH_MeshDriverGMF MeshDriverGMF)
140 SET(SMESH_MeshDriverMED MeshDriverMED)
141 SET(SMESH_MeshDriverSTL MeshDriverSTL)
142 SET(SMESH_MeshDriverUNV MeshDriverUNV)
143 SET(SMESH_MEDWrapper MEDWrapper)
144 SET(SMESH_SMESHObject SMESHObject)
145 SET(SMESH_PluginUtils PluginUtils)
146 SET(SMESH_SMDS SMDS)
147 SET(SMESH_SMESHimpl SMESHimpl)
148 SET(SMESH_SMESHEngine SMESHEngine)
149 SET(SMESH_SMESHClient SMESHClient)
150 SET(SMESH_SMESHDS SMESHDS)
151 SET(SMESH_SMESHFiltersSelection SMESHFiltersSelection)
152 SET(SMESH_SMESH SMESH)
153 SET(SMESH_SMESHUtils SMESHUtils)
154 SET(SMESH_StdMeshers StdMeshers)
155 SET(SMESH_StdMeshersEngine StdMeshersEngine)
156 SET(SMESH_StdMeshersGUI StdMeshersGUI)
157 SET(SMESH_MeshJobManagerEngine MeshJobManagerEngine)
158 SET(SMESH_SPADDERPluginTesterEngine SPADDERPluginTesterEngine)
159 SET(SMESH_SalomeIDLSMESH SalomeIDLSMESH)
160 SET(SMESH_SalomeIDLSPADDER SalomeIDLSPADDER)