1 # Copyright (C) 2012-2023 CEA, EDF, 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
19 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
20 INCLUDE(CMakeDependentOption)
25 PROJECT(SalomeGUI C CXX)
27 STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
31 SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files")
32 IF(EXISTS ${CONFIGURATION_ROOT_DIR})
33 LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake")
34 INCLUDE(SalomeMacros NO_POLICY_SCOPE)
36 MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
41 SALOME_SETUP_VERSION(9.11.0)
42 MESSAGE(STATUS "Building ${PROJECT_NAME_UC} ${${PROJECT_NAME_UC}_VERSION} from \"${${PROJECT_NAME_UC}_GIT_SHA1}\"")
46 SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL")
47 IF(EXISTS ${KERNEL_ROOT_DIR})
48 FIND_PACKAGE(SalomeKERNEL REQUIRED)
49 ADD_DEFINITIONS(${KERNEL_DEFINITIONS})
50 INCLUDE_DIRECTORIES(${KERNEL_INCLUDE_DIRS})
51 ELSE(EXISTS ${KERNEL_ROOT_DIR})
52 MESSAGE(FATAL_ERROR "We absolutely need a Salome KERNEL, please define KERNEL_ROOT_DIR")
53 ENDIF(EXISTS ${KERNEL_ROOT_DIR})
55 # Find SalomeBootstrap
56 FIND_PACKAGE(SalomeBootstrap REQUIRED)
60 INCLUDE(SalomeSetupPlatform) # From CONFIGURATION
61 # Always build libraries as shared objects:
62 SET(BUILD_SHARED_LIBS TRUE)
66 OPTION(SALOME_BUILD_DOC "Generate SALOME GUI documentation" ON)
67 OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON)
68 OPTION(SALOME_GUI_USE_OBSERVERS "Use study observers in GUI (advanced)" ON)
69 OPTION(SALOME_ON_DEMAND "Activate SALOME on demand feature" ON)
70 CMAKE_DEPENDENT_OPTION(SALOME_GUI_BUILD_FRENCH_DOC "Generate SALOME GUI French documentation" OFF
71 "SALOME_BUILD_DOC" OFF)
74 CMAKE_DEPENDENT_OPTION(SALOME_LIGHT_ONLY "Build SALOME Light only (no CORBA)" OFF
75 "NOT SALOME_KERNEL_LIGHT_ONLY" ON)
76 OPTION(SALOME_USE_VTKVIEWER "Enable VTK visualization (Mandatory in classic configurations)" ON)
77 OPTION(SALOME_USE_OCCVIEWER "Enable OCC visualization (Mandatory in classic configurations)" ON)
78 OPTION(SALOME_USE_PV3DVIEWER "Enable ParaView3D visualization (Optionally in classic configurations)" ON)
79 OPTION(SALOME_USE_GLVIEWER "Enable OpenGL visualization (Mandatory in classic configurations)" ON)
80 OPTION(SALOME_USE_GRAPHICSVIEW "Enable GraphicsView visualization (Mandatory in classic configurations)" ON)
81 OPTION(SALOME_USE_PYVIEWER "Enable Python viewer (Mandatory in classic configurations)" ON)
82 OPTION(SALOME_USE_PLOT2DVIEWER "Enable Plot2D visualization (Mandatory in classic configurations)" ON)
83 OPTION(SALOME_USE_PYCONSOLE "Enable Python GUI interface (Mandatory in classic configurations)" ON)
84 OPTION(SALOME_USE_QXGRAPHVIEWER "Enable QX graph visualization (Mandatory in classic configurations)" ON)
85 OPTION(SALOME_USE_PVVIEWER "Enable ParaView visualization (Mandatory in classic configurations)" ON)
87 CMAKE_DEPENDENT_OPTION(SALOME_USE_SALOMEOBJECT "Enable Salome Object (Mandatory in classic configurations)" ON
88 "SALOME_LIGHT_ONLY" ON)
90 MARK_AS_ADVANCED(SALOME_LIGHT_ONLY SALOME_USE_VTKVIEWER SALOME_USE_GRAPHICSVIEW SALOME_USE_PVVIEWER)
91 MARK_AS_ADVANCED(SALOME_USE_SALOMEOBJECT SALOME_USE_OCCVIEWER SALOME_USE_GLVIEWER SALOME_USE_PLOT2DVIEWER)
92 MARK_AS_ADVANCED(SALOME_USE_PYCONSOLE SALOME_USE_QXGRAPHVIEWER SALOME_USE_PYVIEWER SALOME_USE_PV3DVIEWER)
96 # Find "big" prerequisites first - they reference themselves many others
97 # -> this can help finding the smaller prerequisites and detect conficts.
98 # In our case KERNEL has already loaded many prereq which are also used in GUI:
105 FIND_PACKAGE(SalomePythonInterp REQUIRED)
106 FIND_PACKAGE(SalomePythonLibs REQUIRED)
107 FIND_PACKAGE(SalomePThread REQUIRED)
108 FIND_PACKAGE(SalomeSWIG REQUIRED)
109 FIND_PACKAGE(SalomeBoost REQUIRED)
110 FIND_PACKAGE(SalomeHDF5 REQUIRED COMPONENTS C)
112 # Other KERNEL optionals:
113 IF(NOT SALOME_LIGHT_ONLY)
114 FIND_PACKAGE(SalomeOmniORB REQUIRED)
115 FIND_PACKAGE(SalomeOmniORBPy REQUIRED)
117 ADD_DEFINITIONS("-DGUI_DISABLE_CORBA")
119 IF(SALOME_BUILD_TESTS)
121 FIND_PACKAGE(SalomeCppUnit)
122 SALOME_LOG_OPTIONAL_PACKAGE(CppUnit SALOME_BUILD_TESTS)
125 FIND_PACKAGE(SalomeDoxygen)
126 FIND_PACKAGE(SalomeGraphviz)
127 FIND_PACKAGE(SalomeSphinx)
128 SALOME_LOG_OPTIONAL_PACKAGE(Doxygen SALOME_BUILD_DOC)
129 SALOME_LOG_OPTIONAL_PACKAGE(Graphviz SALOME_BUILD_DOC)
130 SALOME_LOG_OPTIONAL_PACKAGE(Sphinx SALOME_BUILD_DOC)
137 FIND_PACKAGE(SalomeSIP REQUIRED) # should come after Python and before PyQt
139 # Build with GUI observers feature
140 IF(SALOME_GUI_USE_OBSERVERS)
141 ADD_DEFINITIONS(-DWITH_SALOMEDS_OBSERVER)
146 ADD_DEFINITIONS(-DWITH_SALOME_ON_DEMAND)
150 IF(SALOME_USE_SINGLE_DESKTOP)
151 ADD_DEFINITIONS(-DSINGLE_DESKTOP)
155 FIND_PACKAGE(SalomeOpenCASCADE REQUIRED)
158 IF(SALOME_USE_OCCVIEWER OR SALOME_USE_VTKVIEWER OR SALOME_USE_GLVIEWER)
159 FIND_PACKAGE(SalomeOpenGL REQUIRED)
163 FIND_PACKAGE(SalomeQt5 REQUIRED)
164 SET(QT_SALOME_VERSION 5)
165 SET(SALOME_GUI_ENABLE_QTXWEBBROWSER TRUE)
166 IF(NOT "${QT_VERSION}" VERSION_LESS "5.6.0")
167 # Check that WebEngineWidgets component was found
168 IF(NOT Qt5WebEngineWidgets_FOUND)
169 SET(SALOME_GUI_ENABLE_QTXWEBBROWSER FALSE)
170 ADD_DEFINITIONS("-DDISABLE_QTXWEBBROWSER")
171 MESSAGE("Qt5WebEngineWidgets is not found, SALOME internal help browser will be unavailable !")
176 FIND_PACKAGE(SalomePyQt5 REQUIRED)
178 # Optional packages for GUI and their pre-requisites
180 # - GL viewer: no prereqs
181 IF(NOT SALOME_USE_GLVIEWER)
182 ADD_DEFINITIONS("-DDISABLE_GLVIEWER")
185 # - OCC viewer: no prereqs
186 IF(NOT SALOME_USE_OCCVIEWER)
187 ADD_DEFINITIONS("-DDISABLE_OCCVIEWER")
190 # - PV viewer: ParaView
191 IF (SALOME_USE_PVVIEWER)
192 FIND_PACKAGE(SalomeParaView)
193 SALOME_LOG_OPTIONAL_PACKAGE(ParaView SALOME_USE_PVVIEWER)
195 ADD_DEFINITIONS("-DDISABLE_PVVIEWER")
198 # - PV3D viewer: ParaView3D
199 IF (SALOME_USE_PV3DVIEWER)
200 FIND_PACKAGE(SalomeParaView)
201 SALOME_LOG_OPTIONAL_PACKAGE(ParaView SALOME_USE_PV3DVIEWER)
203 ADD_DEFINITIONS("-DDISABLE_PV3DVIEWER")
207 IF(SALOME_USE_VTKVIEWER)
208 # Required components are listed in the FindSalomeVTK.cmake file:
209 FIND_PACKAGE(SalomeVTK)
210 SALOME_LOG_OPTIONAL_PACKAGE(VTK SALOME_USE_VTKVIEWER)
211 # VSR: TODO: since ParaView 5.8 the following is not needed, as OPENGL2 is hardcoded: to be removed (everywhere)
212 ADD_DEFINITIONS("-DVTK_OPENGL2")
213 SET(SALOME_GUI_USE_OPENGL2 TRUE)
215 ADD_DEFINITIONS("-DDISABLE_VTKVIEWER")
219 # - Plot2d viewer: Qwt
220 IF(SALOME_USE_PLOT2DVIEWER)
221 FIND_PACKAGE(SalomeQwt)
222 SALOME_LOG_OPTIONAL_PACKAGE(Qwt SALOME_USE_PLOT2DVIEWER)
224 ADD_DEFINITIONS("-DDISABLE_PLOT2DVIEWER")
227 # - Graphics viewer: no prereqs
228 IF (NOT SALOME_USE_GRAPHICSVIEW)
229 ADD_DEFINITIONS("-DDISABLE_GRAPHICSVIEW")
232 # - Python editor: no prereqs
233 IF (NOT SALOME_USE_PYVIEWER)
234 ADD_DEFINITIONS("-DDISABLE_PYVIEWER")
237 # - Python console: no prereqs
238 IF(SALOME_USE_PYCONSOLE)
239 # Build with obsolete Python module's methods
240 ADD_DEFINITIONS(-DCALL_OLD_METHODS)
242 ADD_DEFINITIONS("-DDISABLE_PYCONSOLE")
245 # - Qx viewer: no prereqs
246 IF(NOT SALOME_USE_QXGRAPHVIEWER)
247 ADD_DEFINITIONS("-DDISABLE_QXGRAPHVIEWER")
250 # - SALOME object: no prereqs
251 IF(NOT SALOME_USE_SALOMEOBJECT)
252 ADD_DEFINITIONS("-DDISABLE_SALOMEOBJECT")
255 # Other global definitions
256 ADD_DEFINITIONS("-DGLOBAL_DOUBLE_CONVERSION")
259 SALOME_PACKAGE_REPORT_AND_CHECK()
262 # (default values taken from KERNEL)
265 SET(SALOME_INSTALL_BINS "${SALOME_INSTALL_BINS}" CACHE PATH "Install path: SALOME binaries")
266 SET(SALOME_INSTALL_LIBS "${SALOME_INSTALL_LIBS}" CACHE PATH "Install path: SALOME libs")
267 SET(SALOME_INSTALL_IDLS "${SALOME_INSTALL_IDLS}" CACHE PATH "Install path: SALOME IDL files")
268 SET(SALOME_INSTALL_HEADERS "${SALOME_INSTALL_HEADERS}" CACHE PATH "Install path: SALOME headers")
269 SET(SALOME_INSTALL_SCRIPT_SCRIPTS "${SALOME_INSTALL_SCRIPT_SCRIPTS}" CACHE PATH
270 "Install path: SALOME scripts")
271 SET(SALOME_INSTALL_SCRIPT_DATA "${SALOME_INSTALL_SCRIPT_DATA}" CACHE PATH
272 "Install path: SALOME script data")
273 SET(SALOME_INSTALL_SCRIPT_PYTHON "${SALOME_INSTALL_SCRIPT_PYTHON}" CACHE PATH
274 "Install path: SALOME Python scripts")
275 SET(SALOME_INSTALL_PYTHON "${SALOME_INSTALL_PYTHON}" CACHE PATH "Install path: SALOME Python stuff")
276 SET(SALOME_INSTALL_PYTHON_SHARED "${SALOME_INSTALL_PYTHON_SHARED}" CACHE PATH
277 "Install path: SALOME Python shared modules")
278 SET(SALOME_INSTALL_CMAKE "${SALOME_INSTALL_CMAKE}" CACHE PATH "Install path: SALOME CMake files")
279 SET(SALOME_INSTALL_CMAKE_LOCAL "${SALOME_INSTALL_CMAKE_LOCAL}" CACHE PATH
280 "Install path: local SALOME CMake files")
281 SET(SALOME_INSTALL_AMCONFIG_LOCAL "${SALOME_INSTALL_AMCONFIG_LOCAL}" CACHE PATH
282 "Install path: local SALOME config files (obsolete, to be removed)")
284 SET(SALOME_INSTALL_RES "${SALOME_INSTALL_RES}" CACHE PATH "Install path: SALOME resources")
285 SET(SALOME_INSTALL_DOC "${SALOME_INSTALL_DOC}" CACHE PATH "Install path: SALOME documentation")
288 SET(SALOME_GUI_INSTALL_RES_DATA "${SALOME_INSTALL_RES}/gui" CACHE PATH
289 "Install path: SALOME GUI specific data")
290 SET(SALOME_GUI_INSTALL_RES_SCRIPTS "${SALOME_INSTALL_RES}/gui" CACHE PATH
291 "Install path: SALOME GUI scripts")
292 SET(SALOME_GUI_INSTALL_PLUGINS share/salome/plugins/gui CACHE PATH
293 "Install path: SALOME GUI plugins")
295 MARK_AS_ADVANCED(SALOME_INSTALL_BINS SALOME_INSTALL_LIBS SALOME_INSTALL_IDLS SALOME_INSTALL_HEADERS)
296 MARK_AS_ADVANCED(SALOME_INSTALL_SCRIPT_SCRIPTS SALOME_INSTALL_SCRIPT_DATA SALOME_INSTALL_SCRIPT_PYTHON)
297 MARK_AS_ADVANCED(SALOME_INSTALL_APPLISKEL_SCRIPTS SALOME_INSTALL_APPLISKEL_PYTHON SALOME_INSTALL_CMAKE SALOME_INSTALL_CMAKE_LOCAL SALOME_INSTALL_RES)
298 MARK_AS_ADVANCED(SALOME_INSTALL_PYTHON SALOME_INSTALL_PYTHON_SHARED)
299 MARK_AS_ADVANCED(SALOME_GUI_INSTALL_RES_DATA SALOME_GUI_INSTALL_RES_SCRIPTS SALOME_GUI_INSTALL_PLUGINS)
300 MARK_AS_ADVANCED(SALOME_INSTALL_AMCONFIG_LOCAL SALOME_INSTALL_DOC)
302 # Accumulate environment variables for GUI module
303 SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_BINS}
304 ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON}
305 ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}
306 ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON_SHARED})
307 SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS})
311 IF(NOT SALOME_LIGHT_ONLY)
312 ADD_SUBDIRECTORY(idl)
315 ADD_SUBDIRECTORY(adm_local)
316 ADD_SUBDIRECTORY(src)
318 ADD_SUBDIRECTORY(doc)
320 ADD_SUBDIRECTORY(bin)
321 ADD_SUBDIRECTORY(tools)
323 # Header configuration
324 # ====================
325 SALOME_CONFIGURE_FILE(GUI_version.h.in GUI_version.h INSTALL ${SALOME_INSTALL_HEADERS})
327 # Configuration export
328 # (here only the level 1 prerequisites are exposed)
329 # ====================
330 INCLUDE(CMakePackageConfigHelpers)
332 # List of targets in this project we want to make visible to the rest of the world.
333 # They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup"
334 SET(_${PROJECT_NAME}_exposed_targets
335 CAM CASCatch DDS Event LightApp LogWindow ObjBrowser
336 QDS qtx SalomePrs SalomeStyle std SUITApp suit ViewerTools ViewerData
341 IF(SALOME_USE_OCCVIEWER OR SALOME_USE_VTKVIEWER OR SALOME_USE_GLVIEWER)
342 LIST(APPEND _${PROJECT_NAME}_exposed_targets
344 ENDIF(SALOME_USE_OCCVIEWER OR SALOME_USE_VTKVIEWER OR SALOME_USE_GLVIEWER)
346 # SALOME object specific targets:
347 IF(SALOME_USE_SALOMEOBJECT)
348 LIST(APPEND _${PROJECT_NAME}_exposed_targets
350 ENDIF(SALOME_USE_SALOMEOBJECT)
352 # GL specific targets:
353 IF(SALOME_USE_GLVIEWER)
354 LIST(APPEND _${PROJECT_NAME}_exposed_targets
356 ENDIF(SALOME_USE_GLVIEWER)
358 # VTK specific targets:
359 IF(SALOME_USE_VTKVIEWER)
360 LIST(APPEND _${PROJECT_NAME}_exposed_targets
362 IF(SALOME_USE_SALOMEOBJECT)
363 LIST(APPEND _${PROJECT_NAME}_exposed_targets
365 ENDIF(SALOME_USE_SALOMEOBJECT)
366 ENDIF(SALOME_USE_VTKVIEWER)
368 # OCC specific targets:
369 IF(SALOME_USE_OCCVIEWER)
370 LIST(APPEND _${PROJECT_NAME}_exposed_targets
372 IF(SALOME_USE_SALOMEOBJECT)
373 LIST(APPEND _${PROJECT_NAME}_exposed_targets
375 ENDIF(SALOME_USE_SALOMEOBJECT)
376 ENDIF(SALOME_USE_OCCVIEWER)
378 # PV3D specific targets:
379 IF(SALOME_USE_PV3DVIEWER)
380 LIST(APPEND _${PROJECT_NAME}_exposed_targets
382 IF(SALOME_USE_SALOMEOBJECT)
383 LIST(APPEND _${PROJECT_NAME}_exposed_targets
385 ENDIF(SALOME_USE_SALOMEOBJECT)
386 ENDIF(SALOME_USE_PV3DVIEWER)
388 # Plot2d specific targets:
389 IF(SALOME_USE_PLOT2DVIEWER)
390 LIST(APPEND _${PROJECT_NAME}_exposed_targets
392 IF(SALOME_USE_SALOMEOBJECT)
393 LIST(APPEND _${PROJECT_NAME}_exposed_targets
395 ENDIF(SALOME_USE_SALOMEOBJECT)
396 ENDIF(SALOME_USE_PLOT2DVIEWER)
398 # Qx specific targets:
399 IF(SALOME_USE_QXGRAPHVIEWER)
400 LIST(APPEND _${PROJECT_NAME}_exposed_targets
402 ENDIF(SALOME_USE_QXGRAPHVIEWER)
404 # GraphicsView specific targets:
405 IF(SALOME_USE_GRAPHICSVIEW)
406 LIST(APPEND _${PROJECT_NAME}_exposed_targets
408 ENDIF(SALOME_USE_GRAPHICSVIEW)
410 # PyEditor/Viewer specific targets:
411 IF(SALOME_USE_PYVIEWER)
412 LIST(APPEND _${PROJECT_NAME}_exposed_targets
414 ENDIF(SALOME_USE_PYVIEWER)
416 # ParaView viewer specific targets:
417 IF(SALOME_USE_PVVIEWER)
418 LIST(APPEND _${PROJECT_NAME}_exposed_targets PVViewer PVServerService)
421 # Python-based packages specific targets:
422 IF(SALOME_USE_PYCONSOLE)
423 LIST(APPEND _${PROJECT_NAME}_exposed_targets
424 PyInterp PyConsole SalomePyQtGUILight)
425 IF(SALOME_USE_PLOT2DVIEWER)
426 LIST(APPEND _${PROJECT_NAME}_exposed_targets SalomePyQt)
428 IF(NOT SALOME_LIGHT_ONLY)
429 LIST(APPEND _${PROJECT_NAME}_exposed_targets SalomePyQtGUI)
431 IF(SALOME_USE_VTKVIEWER)
432 LIST(APPEND _${PROJECT_NAME}_exposed_targets SalomePy)
433 ENDIF(SALOME_USE_VTKVIEWER)
434 ENDIF(SALOME_USE_PYCONSOLE)
436 # CORBA specific targets:
437 IF(NOT SALOME_LIGHT_ONLY)
438 LIST(APPEND _${PROJECT_NAME}_exposed_targets
439 SalomeIDLGUI SalomeSession SalomeApp SalomeAppSL SalomeAppImpl SalomeGuiHelpers SalomeTreeData ToolsGUI)
440 ENDIF(NOT SALOME_LIGHT_ONLY)
442 # Add all targets to the build-tree export set
443 EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets}
444 FILE ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake)
446 # Create the configuration files:
447 # - in the build tree:
449 # Ensure the variables are always defined for the configure:
450 SET(KERNEL_ROOT_DIR "${KERNEL_ROOT_DIR}")
451 SET(SIP_ROOT_DIR "${SIP_ROOT_DIR}")
452 SET(QT_ROOT_DIR "${QT5_ROOT_DIR}")
453 SET(PYQT_ROOT_DIR "${PYQT5_ROOT_DIR}")
455 SET(OPENCASCADE_ROOT_DIR "${OPENCASCADE_ROOT_DIR}")
456 SET(OPENGL_ROOT_DIR "${OPENGL_ROOT_DIR}")
457 SET(PARAVIEW_ROOT_DIR "${PARAVIEW_ROOT_DIR}")
458 SET(VTK_ROOT_DIR "${VTK_ROOT_DIR}")
459 SET(QWT_ROOT_DIR "${QWT_ROOT_DIR}")
461 SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/include")
463 # Build variables that will be expanded when configuring Salome<MODULE>Config.cmake:
464 SALOME_CONFIGURE_PREPARE(OpenCASCADE OpenGL Qt5 PyQt5 Qwt SIP ParaView VTK)
466 CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in
467 ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
468 INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
469 PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX
470 KERNEL_ROOT_DIR SIP_ROOT_DIR QT_ROOT_DIR PYQT_ROOT_DIR OPENCASCADE_ROOT_DIR
471 OPENGL_ROOT_DIR PARAVIEW_ROOT_DIR VTK_ROOT_DIR QWT_ROOT_DIR)
473 # - in the install tree (VSR 16/08/2013: TEMPORARILY COMMENT THIS - TO REMOVE?):
474 # Get the relative path of the include directory so
475 # we can register it in the generated configuration files:
476 #SET(CONF_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}")
477 #CONFIGURE_PACKAGE_CONFIG_FILE(adm_local/cmake_files/${PROJECT_NAME}Config.cmake.in
478 # ${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake
479 # INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
480 # PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX
481 # KERNEL_ROOT_DIR SIP_ROOT_DIR QT_ROOT_DIR PYQT_ROOT_DIR OPENCASCADE_ROOT_DIR
482 # OPENGL_ROOT_DIR PARAVIEW_ROOT_DIR VTK_ROOT_DIR QWT_ROOT_DIR)
484 WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
485 VERSION ${${PROJECT_NAME_UC}_VERSION}
486 COMPATIBILITY AnyNewerVersion)
488 # Install the CMake configuration files:
490 "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
491 "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
492 DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}")
494 # Install the export set for use with the install-tree
495 INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
496 FILE ${PROJECT_NAME}Targets.cmake)