1 # Copyright (C) 2013-2015 CEA/DEN, EDF R&D, OPEN CASCADE
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 # - Config file for the @PROJECT_NAME@ package
21 # It defines the following variables.
22 # Specific to the pacakge @PROJECT_NAME@ itself:
23 # @PROJECT_NAME_UC@_ROOT_DIR_EXP - the root path of the installation providing this CMake file
26 ### Initialisation performed by CONFIGURE_PACKAGE_CONFIG_FILE:
29 # Load the dependencies for the libraries of @PROJECT_NAME@
30 # (contains definitions for IMPORTED targets). This is only
31 # imported if we are not built as a subproject (in this case targets are already there)
32 IF(NOT TARGET GEOMbasic AND NOT @PROJECT_NAME@_BINARY_DIR)
33 INCLUDE("@PACKAGE_SALOME_INSTALL_CMAKE_LOCAL@/@PROJECT_NAME@Targets.cmake")
37 SET_AND_CHECK(GEOM_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
40 SET_AND_CHECK(GEOM_INCLUDE_DIRS "${GEOM_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
41 SET(GEOM_INCLUDE_DIRS "${GEOM_INCLUDE_DIRS};@_SalomeGEOM_EXTRA_HEADERS@")
42 SET(GEOM_DEFINITIONS "@KERNEL_DEFINITIONS@")
44 # Package specific environment variables
45 @_SalomeGEOM_EXTRA_ENV_FULL@
47 #### Now the specificities
49 # Options exported by the package:
50 SET(SALOME_GEOM_BUILD_DOC @SALOME_BUILD_DOC@)
51 SET(SALOME_GEOM_BUILD_TESTS @SALOME_BUILD_TESTS@)
54 SET(SALOME_GEOM_BUILD_GUI @SALOME_BUILD_GUI@)
55 SET(SALOME_GEOM_USE_OPENCV @SALOME_GEOM_USE_OPENCV@)
57 # Level 1 prerequisites:
58 SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_KERNEL_ROOT_DIR@")
59 SET_AND_CHECK(CAS_ROOT_DIR_EXP "@PACKAGE_CAS_ROOT_DIR@")
60 SET_AND_CHECK(VTK_ROOT_DIR_EXP "@PACKAGE_VTK_ROOT_DIR@")
62 # Optional level 1 prerequisites:
63 IF(SALOME_GEOM_BUILD_GUI)
64 SET_AND_CHECK(GUI_ROOT_DIR_EXP "@PACKAGE_GUI_ROOT_DIR@")
65 LIST(APPEND GEOM_DEFINITIONS "@GUI_DEFINITIONS@")
67 IF(SALOME_GEOM_USE_OPENCV)
68 SET_AND_CHECK(OPENCV_ROOT_DIR_EXP "@PACKAGE_OPENCV_ROOT_DIR@")
69 LIST(APPEND GEOM_DEFINITIONS "-DWITH_OPENCV")
72 # For all prerequisites, load the corresponding targets if the package was used
73 # in CONFIG mode. This ensures dependent projects link correctly
74 # without having to set LD_LIBRARY_PATH:
75 SET(_PREREQ @_PREREQ_LIST@)
76 SET(_PREREQ_CONFIG_DIR @_PREREQ_DIR_LIST@)
77 SET(_PREREQ_COMPONENTS "@_PREREQ_COMPO_LIST@")
78 LIST(LENGTH _PREREQ_CONFIG_DIR _list_len)
79 IF(NOT _list_len EQUAL 0)
80 # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
81 MATH(EXPR _range "${_list_len}-1")
82 FOREACH(_p RANGE ${_range})
83 LIST(GET _PREREQ ${_p} _pkg )
84 LIST(GET _PREREQ_CONFIG_DIR ${_p} _pkg_dir)
85 LIST(GET _PREREQ_COMPONENTS ${_p} _pkg_compo)
86 MESSAGE(STATUS "===> Reloading targets from ${_pkg} ...")
88 FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE
92 STRING(REPLACE "," ";" _compo_lst "${_pkg_compo}")
93 MESSAGE(STATUS "===> (components: ${_pkg_compo})")
94 FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE
95 COMPONENTS ${_compo_lst}
102 # Installation directories
103 SET(SALOME_INSTALL_BINS "@SALOME_INSTALL_BINS@")
104 SET(SALOME_INSTALL_LIBS "@SALOME_INSTALL_LIBS@")
105 SET(SALOME_INSTALL_IDLS "@SALOME_INSTALL_IDLS@")
106 SET(SALOME_INSTALL_HEADERS "@SALOME_INSTALL_HEADERS@")
107 SET(SALOME_INSTALL_SCRIPT_SCRIPTS "@SALOME_INSTALL_SCRIPT_SCRIPTS@")
108 SET(SALOME_INSTALL_SCRIPT_DATA "@SALOME_INSTALL_SCRIPT_DATA@")
109 SET(SALOME_INSTALL_SCRIPT_PYTHON "@SALOME_INSTALL_SCRIPT_PYTHON@")
110 SET(SALOME_INSTALL_CMAKE "@SALOME_INSTALL_CMAKE@")
111 SET(SALOME_INSTALL_CMAKE_LOCAL "@SALOME_INSTALL_CMAKE_LOCAL@")
112 SET(SALOME_INSTALL_PYTHON "@SALOME_INSTALL_PYTHON@")
113 SET(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@")
114 SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@")
115 SET(SALOME_INSTALL_DOC "@SALOME_INSTALL_DOC@")
116 SET(SALOME_INSTALL_AMCONFIG_LOCAL "@SALOME_INSTALL_AMCONFIG_LOCAL@")
118 IF(SALOME_GEOM_BUILD_GUI)
119 # Include GUI targets if they were not already loaded:
120 IF(NOT (TARGET Event))
121 INCLUDE("${GUI_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE_LOCAL}/SalomeGUITargets.cmake")
123 ELSE(SALOME_GEOM_BUILD_GUI)
124 # Include KERNEL targets if they were not already loaded:
125 IF(NOT (TARGET SALOMEBasics) AND NOT SALOME_MED_STANDALONE)
126 INCLUDE("${KERNEL_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE}/SalomeKERNELTargets.cmake")
128 ENDIF(SALOME_GEOM_BUILD_GUI)
130 # Exposed GEOM targets:
131 SET(GEOM_GEOMArchimede GEOMArchimede)
132 SET(GEOM_BlockFix BlockFix)
133 SET(GEOM_GEOMbasic GEOMbasic)
134 SET(GEOM_GEOMAlgo GEOMAlgo)
135 SET(GEOM_GEOMClient GEOMClient)
136 SET(GEOM_GEOMImpl GEOMImpl)
137 SET(GEOM_GEOMUtils GEOMUtils)
138 SET(GEOM_GEOMEngine GEOMEngine)
139 SET(GEOM_GEOM_SupervEngine GEOM_SupervEngine)
140 SET(GEOM_GEOMSketcher GEOMSketcher)
141 SET(GEOM_SalomeIDLGEOM SalomeIDLGEOM)
142 SET(GEOM_SalomeIDLGEOMSuperv SalomeIDLGEOMSuperv)
143 SET(GEOM_SalomeIDLAdvancedGEOM SalomeIDLAdvancedGEOM)
144 SET(GEOM_SalomeIDLSTLPlugin SalomeIDLSTLPlugin)
145 SET(GEOM_SalomeIDLBREPPlugin SalomeIDLBREPPlugin)
146 SET(GEOM_SalomeIDLSTEPPlugin SalomeIDLSTEPPlugin)
147 SET(GEOM_SalomeIDLIGESPlugin SalomeIDLIGESPlugin)
148 SET(GEOM_SalomeIDLXAOPlugin SalomeIDLXAOPlugin)
149 SET(GEOM_SalomeIDLVTKPlugin SalomeIDLVTKPlugin)
150 SET(GEOM_ShHealOper ShHealOper)
152 SET(GEOM_AdvancedEngine AdvancedEngine)
153 SET(GEOM_AdvancedGUI AdvancedGUI)
154 SET(GEOM_BasicGUI BasicGUI)
155 SET(GEOM_BlocksGUI BlocksGUI)
156 SET(GEOM_BooleanGUI BooleanGUI)
157 SET(GEOM_BuildGUI BuildGUI)
158 SET(GEOM_DisplayGUI DisplayGUI)
159 SET(GEOM_DlgRef DlgRef)
160 SET(GEOM_EntityGUI EntityGUI)
161 SET(GEOM_GEOMBase GEOMBase)
162 SET(GEOM_GEOMFiltersSelection GEOMFiltersSelection)
164 SET(GEOM_GEOMToolsGUI GEOMToolsGUI)
165 SET(GEOM_DependencyTree DependencyTree)
166 SET(GEOM_GenerationGUI GenerationGUI)
167 SET(GEOM_GroupGUI GroupGUI)
168 SET(GEOM_Material Material)
169 SET(GEOM_MeasureGUI MeasureGUI)
170 SET(GEOM_GEOMObject GEOMObject)
171 SET(GEOM_OCC2VTK OCC2VTK)
172 SET(GEOM_OperationGUI OperationGUI)
173 SET(GEOM_PrimitiveGUI PrimitiveGUI)
174 SET(GEOM_RepairGUI RepairGUI)
175 SET(GEOM_TransformationGUI TransformationGUI)
176 SET(GEOM_STLPluginGUI STLPluginGUI)
177 SET(GEOM_STLPluginEngine STLPluginEngine)
178 SET(GEOM_BREPPluginGUI BREPPluginGUI)
179 SET(GEOM_BREPPluginEngine BREPPluginEngine)
180 SET(GEOM_STEPPluginGUI STEPPluginGUI)
181 SET(GEOM_STEPPluginEngine STEPPluginEngine)
182 SET(GEOM_IGESPluginGUI IGESPluginGUI)
183 SET(GEOM_IGESPluginEngine IGESPluginEngine)
184 SET(GEOM_XAOPluginGUI XAOPluginGUI)
185 SET(GEOM_XAOPluginEngine XAOPluginEngine)
186 SET(GEOM_VTKPluginGUI VTKPluginGUI)
187 SET(GEOM_VTKPluginEngine VTKPluginEngine)
188 SET(GEOM_GEOMShapeRec GEOMShapeRec)
189 SET(GEOM_CurveCreator CurveCreator)