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 Event AND NOT @PROJECT_NAME@_BINARY_DIR)
33 INCLUDE("@PACKAGE_SALOME_INSTALL_CMAKE_LOCAL@/@PROJECT_NAME@Targets.cmake")
37 SET_AND_CHECK(GUI_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
40 SET_AND_CHECK(GUI_INCLUDE_DIRS "${GUI_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
41 SET(GUI_INCLUDE_DIRS "${GUI_INCLUDE_DIRS};@_SalomeGUI_EXTRA_HEADERS@")
42 SET(GUI_DEFINITIONS "@KERNEL_DEFINITIONS@")
44 # Package specific environment variables
45 @_SalomeGUI_EXTRA_ENV_FULL@
47 #### Now the specificities
49 # Options exported by the package:
50 SET(SALOME_GUI_BUILD_DOC @SALOME_BUILD_DOC@)
51 SET(SALOME_GUI_BUILD_TESTS @SALOME_BUILD_TESTS@)
52 SET(SALOME_GUI_LIGHT_ONLY @SALOME_LIGHT_ONLY@)
55 SET(SALOME_USE_OCCVIEWER @SALOME_USE_OCCVIEWER@)
56 SET(SALOME_USE_GLVIEWER @SALOME_USE_GLVIEWER@)
57 SET(SALOME_USE_VTKVIEWER @SALOME_USE_VTKVIEWER@)
58 SET(SALOME_USE_PLOT2DVIEWER @SALOME_USE_PLOT2DVIEWER@)
59 SET(SALOME_USE_GRAPHICSVIEW @SALOME_USE_GRAPHICSVIEW@)
60 SET(SALOME_USE_QXGRAPHVIEWER @SALOME_USE_QXGRAPHVIEWER@)
61 SET(SALOME_USE_PVVIEWER @SALOME_USE_PVVIEWER@)
62 SET(SALOME_USE_PYVIEWER @SALOME_USE_PYVIEWER@)
63 SET(SALOME_USE_PYCONSOLE @SALOME_USE_PYCONSOLE@)
64 SET(SALOME_USE_SALOMEOBJECT @SALOME_USE_SALOMEOBJECT@)
65 SET(SALOME_USE_SINGLE_DESKTOP @SALOME_USE_SINGLE_DESKTOP@)
66 SET(SALOME_GUI_USE_OBSERVERS @SALOME_GUI_USE_OBSERVERS@)
68 IF(SALOME_GUI_LIGHT_ONLY)
69 LIST(APPEND GUI_DEFINITIONS "-DGUI_DISABLE_CORBA")
71 IF(SALOME_USE_SINGLE_DESKTOP)
72 LIST(APPEND GUI_DEFINITIONS "-DSINGLE_DESKTOP")
74 IF(SALOME_GUI_USE_OBSERVERS)
75 LIST(APPEND GUI_DEFINITIONS "-DWITH_SALOMEDS_OBSERVER")
77 IF(NOT SALOME_USE_OCCVIEWER)
78 LIST(APPEND GUI_DEFINITIONS "-DDISABLE_OCCVIEWER")
80 IF(NOT SALOME_USE_GLVIEWER)
81 LIST(APPEND GUI_DEFINITIONS "-DDISABLE_GLVIEWER")
84 IF(NOT SALOME_USE_VTKVIEWER)
85 LIST(APPEND GUI_DEFINITIONS "-DDISABLE_VTKVIEWER")
87 IF(NOT SALOME_USE_PLOT2DVIEWER)
88 LIST(APPEND GUI_DEFINITIONS "-DDISABLE_PLOT2DVIEWER")
90 IF (NOT SALOME_USE_GRAPHICSVIEW)
91 LIST(APPEND GUI_DEFINITIONS "-DDISABLE_GRAPHICSVIEW")
93 IF (NOT SALOME_USE_PVVIEWER)
94 LIST(APPEND GUI_DEFINITIONS "-DDISABLE_PVVIEWER")
96 IF(NOT SALOME_USE_PYVIEWER)
97 LIST(APPEND GUI_DEFINITIONS "-DDISABLE_PYVIEWER")
99 IF(NOT SALOME_USE_PYCONSOLE)
100 LIST(APPEND GUI_DEFINITIONS "-DDISABLE_PYCONSOLE")
102 IF(NOT SALOME_USE_QXGRAPHVIEWER)
103 LIST(APPEND GUI_DEFINITIONS "-DDISABLE_QXGRAPHVIEWER")
105 IF(NOT SALOME_USE_SALOMEOBJECT)
106 LIST(APPEND GUI_DEFINITIONS "-DDISABLE_SALOMEOBJECT")
109 # Level 1 prerequisites:
110 SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_KERNEL_ROOT_DIR@")
111 SET_AND_CHECK(SIP_ROOT_DIR_EXP "@PACKAGE_SIP_ROOT_DIR@")
112 SET_AND_CHECK(QT4_ROOT_DIR_EXP "@PACKAGE_QT4_ROOT_DIR@")
113 SET_AND_CHECK(PYQT4_ROOT_DIR_EXP "@PACKAGE_PYQT4_ROOT_DIR@")
114 SET_AND_CHECK(CAS_ROOT_DIR_EXP "@PACKAGE_CAS_ROOT_DIR@")
116 # Optional level 1 prerequisites:
117 IF(SALOME_USE_GLVIEWER)
118 SET_AND_CHECK(OPENGL_ROOT_DIR_EXP "@PACKAGE_OPENGL_ROOT_DIR@")
120 IF(SALOME_USE_VTKVIEWER)
121 SET_AND_CHECK(VTK_ROOT_DIR_EXP "@PACKAGE_VTK_ROOT_DIR@")
123 IF(SALOME_USE_PLOT2DVIEWER)
124 SET_AND_CHECK(QWT_ROOT_DIR_EXP "@PACKAGE_QWT_ROOT_DIR@")
127 # For all prerequisites, load the corresponding targets if the package was used
128 # in CONFIG mode. This ensures dependent projects link correctly
129 # without having to set LD_LIBRARY_PATH:
130 SET(_PREREQ @_PREREQ_LIST@)
131 SET(_PREREQ_CONFIG_DIR @_PREREQ_DIR_LIST@)
132 SET(_PREREQ_COMPONENTS "@_PREREQ_COMPO_LIST@")
133 LIST(LENGTH _PREREQ_CONFIG_DIR _list_len)
134 IF(NOT _list_len EQUAL 0)
135 # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
136 MATH(EXPR _range "${_list_len}-1")
137 FOREACH(_p RANGE ${_range})
138 LIST(GET _PREREQ ${_p} _pkg )
139 LIST(GET _PREREQ_CONFIG_DIR ${_p} _pkg_dir)
140 LIST(GET _PREREQ_COMPONENTS ${_p} _pkg_compo)
141 MESSAGE(STATUS "===> Reloading targets from ${_pkg} ...")
143 FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE
147 STRING(REPLACE "," ";" _compo_lst "${_pkg_compo}")
148 MESSAGE(STATUS "===> (components: ${_pkg_compo})")
149 FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE
150 COMPONENTS ${_compo_lst}
157 # Installation directories
158 SET(SALOME_INSTALL_BINS "@SALOME_INSTALL_BINS@")
159 SET(SALOME_INSTALL_LIBS "@SALOME_INSTALL_LIBS@")
160 SET(SALOME_INSTALL_IDLS "@SALOME_INSTALL_IDLS@")
161 SET(SALOME_INSTALL_HEADERS "@SALOME_INSTALL_HEADERS@")
162 SET(SALOME_INSTALL_SCRIPT_SCRIPTS "@SALOME_INSTALL_SCRIPT_SCRIPTS@")
163 SET(SALOME_INSTALL_SCRIPT_DATA "@SALOME_INSTALL_SCRIPT_DATA@")
164 SET(SALOME_INSTALL_SCRIPT_PYTHON "@SALOME_INSTALL_SCRIPT_PYTHON@")
165 SET(SALOME_INSTALL_APPLISKEL_SCRIPTS "@SALOME_INSTALL_APPLISKEL_SCRIPTS@")
166 SET(SALOME_INSTALL_APPLISKEL_PYTHON "@SALOME_INSTALL_APPLISKEL_PYTHON@")
167 SET(SALOME_INSTALL_CMAKE "@SALOME_INSTALL_CMAKE@")
168 SET(SALOME_INSTALL_CMAKE_LOCAL "@SALOME_INSTALL_CMAKE_LOCAL@")
169 SET(SALOME_INSTALL_PYTHON "@SALOME_INSTALL_PYTHON@")
170 SET(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@")
171 SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@")
172 SET(SALOME_INSTALL_DOC "@SALOME_INSTALL_DOC@")
173 SET(SALOME_INSTALL_AMCONFIG_LOCAL "@SALOME_INSTALL_AMCONFIG_LOCAL@")
175 # Include KERNEL targets if they were not already loaded:
176 IF(NOT (TARGET SALOMEBasics))
177 INCLUDE("${KERNEL_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE}/SalomeKERNELTargets.cmake")
180 # Exposed GUI targets:
183 SET(GUI_CASCatch CASCatch)
186 SET(GUI_GLViewer GLViewer)
187 SET(GUI_LightApp LightApp)
188 SET(GUI_LogWindow LogWindow)
189 SET(GUI_ObjBrowser ObjBrowser)
190 SET(GUI_OCCViewer OCCViewer)
191 SET(GUI_OpenGLUtils OpenGLUtils)
192 SET(GUI_Plot2d Plot2d)
193 SET(GUI_PyConsole PyConsole)
194 SET(GUI_PyInterp PyInterp)
195 SET(GUI_PyEditor PyEditor)
196 SET(GUI_PyViewer PyViewer)
199 SET(GUI_QxScene QxScene)
200 SET(GUI_SalomeApp SalomeApp)
201 SET(GUI_SalomeIDLGUI SalomeIDLGUI)
202 SET(GUI_SalomeObject SalomeObject)
203 SET(GUI_SalomePrs SalomePrs)
204 SET(GUI_SalomePyQtGUILight SalomePyQtGUILight)
205 SET(GUI_SalomePyQtGUI SalomePyQtGUI)
206 SET(GUI_SalomePyQt SalomePyQt)
207 SET(GUI_SalomePy SalomePy)
208 SET(GUI_SalomeSession SalomeSession)
209 SET(GUI_SalomeStyle SalomeStyle)
211 SET(GUI_SPlot2d SPlot2d)
213 SET(GUI_SUITApp SUITApp)
216 SET(GUI_ToolsGUI ToolsGUI)
217 SET(GUI_ViewerTools ViewerTools)
218 SET(GUI_ViewerData ViewerData)
219 SET(GUI_VTKViewer VTKViewer)
220 SET(GUI_PVViewer PVViewer)
221 SET(GUI_vtkEDFOverloads vtkEDFOverloads)
222 SET(GUI_vtkTools vtkTools)
223 SET(GUI_SalomeGuiHelpers SalomeGuiHelpers)
224 SET(GUI_SalomeTreeData SalomeTreeData)
225 SET(GUI_ImageComposer ImageComposer)
226 SET(GUI_GraphicsView GraphicsView)