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
24 # additional include directories
26 ${OpenCASCADE_INCLUDE_DIR}
29 ${GRAPHVIZ_INCLUDE_DIRS}
30 ${PTHREAD_INCLUDE_DIR}
32 ${PROJECT_SOURCE_DIR}/src/CAM
33 ${PROJECT_SOURCE_DIR}/src/CASCatch
34 ${PROJECT_SOURCE_DIR}/src/Event
35 ${PROJECT_SOURCE_DIR}/src/LogWindow
36 ${PROJECT_SOURCE_DIR}/src/ObjBrowser
37 ${PROJECT_SOURCE_DIR}/src/Prs
38 ${PROJECT_SOURCE_DIR}/src/Qtx
39 ${PROJECT_SOURCE_DIR}/src/STD
40 ${PROJECT_SOURCE_DIR}/src/SUIT
41 ${PROJECT_SOURCE_DIR}/src/Style
42 ${PROJECT_SOURCE_DIR}/src/SalomeApprc_utils
44 IF(SALOME_USE_SALOMEOBJECT)
45 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/OBJECT)
47 IF(SALOME_USE_GLVIEWER)
48 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/GLViewer)
50 IF(SALOME_USE_GRAPHICSVIEW)
51 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/GraphicsView)
53 IF(SALOME_USE_PYVIEWER)
54 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/PyEditor)
55 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/PyViewer)
57 IF(SALOME_USE_OCCVIEWER)
58 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/OCCViewer)
59 IF(SALOME_USE_SALOMEOBJECT)
60 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/SOCC)
63 IF(SALOME_USE_PV3DVIEWER)
64 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/PV3DViewer)
65 IF(SALOME_USE_SALOMEOBJECT)
66 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/SPV3D)
69 IF(SALOME_USE_PLOT2DVIEWER)
70 INCLUDE_DIRECTORIES(${QWT_INCLUDE_DIR})
71 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/Plot2d)
72 IF(SALOME_USE_SALOMEOBJECT)
73 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/SPlot2d)
76 IF(SALOME_USE_VTKVIEWER)
77 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/VTKViewer)
78 IF(SALOME_USE_SALOMEOBJECT)
79 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/SVTK)
82 IF(SALOME_USE_QXGRAPHVIEWER)
83 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/QxScene)
85 IF(SALOME_USE_PVVIEWER)
86 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/PVViewer)
88 IF(SALOME_USE_PYCONSOLE)
90 ${PYTHON_INCLUDE_DIRS}
91 ${PROJECT_SOURCE_DIR}/tools/PyConsole/src
92 ${PROJECT_SOURCE_DIR}/tools/PyInterp/src
93 ${PROJECT_SOURCE_DIR}/src/SUITApp
97 # additional preprocessor / compiler flags
98 ADD_DEFINITIONS(${OpenCASCADE_DEFINITIONS} ${QT_DEFINITIONS} ${HDF5_DEFINITIONS})
99 IF(SALOME_USE_PLOT2DVIEWER)
100 ADD_DEFINITIONS(${QWT_DEFINITIONS})
102 IF(SALOME_USE_PYCONSOLE)
103 ADD_DEFINITIONS(${PYTHON_DEFINITIONS})
106 # libraries to link to
108 ${OpenCASCADE_FoundationClasses_LIBRARIES}
111 CASCatch qtx suit std SalomeStyle SalomePrs CAM LogWindow ObjBrowser Event
113 ${KERNEL_SalomeHDFPersist} ${KERNEL_SALOMELocalTrace}
114 ${GRAPHVIZ_LIBRARIES}
117 IF(SALOME_USE_SALOMEOBJECT)
118 LIST(APPEND _link_LIBRARIES SalomeObject)
120 IF(SALOME_USE_GLVIEWER)
121 LIST(APPEND _link_LIBRARIES GLViewer)
123 IF(SALOME_USE_GRAPHICSVIEW)
124 LIST(APPEND _link_LIBRARIES GraphicsView)
126 IF(SALOME_USE_PYVIEWER)
127 LIST(APPEND _link_LIBRARIES PyEditor PyViewer)
129 IF(SALOME_USE_OCCVIEWER)
130 LIST(APPEND _link_LIBRARIES OCCViewer)
131 IF(SALOME_USE_SALOMEOBJECT)
132 LIST(APPEND _link_LIBRARIES SOCC)
135 IF(SALOME_USE_PV3DVIEWER)
136 LIST(APPEND _link_LIBRARIES PV3DViewer)
137 IF(SALOME_USE_SALOMEOBJECT)
138 LIST(APPEND _link_LIBRARIES SPV3D)
141 IF(SALOME_USE_PLOT2DVIEWER)
142 LIST(APPEND _link_LIBRARIES Plot2d)
143 IF(SALOME_USE_SALOMEOBJECT)
144 LIST(APPEND _link_LIBRARIES SPlot2d)
147 IF(SALOME_USE_VTKVIEWER)
148 LIST(APPEND _link_LIBRARIES VTKViewer)
149 IF(SALOME_USE_SALOMEOBJECT)
150 LIST(APPEND _link_LIBRARIES SVTK)
153 IF(SALOME_USE_QXGRAPHVIEWER)
154 LIST(APPEND _link_LIBRARIES QxScene)
156 IF(SALOME_USE_PVVIEWER)
157 LIST(APPEND _link_LIBRARIES PVViewer)
159 IF(SALOME_USE_PYCONSOLE)
160 LIST(APPEND _link_LIBRARIES PyInterp PyConsole SUITApp)
165 # header files / to be processed by moc
168 LightApp_Application.h
172 LightApp_ModuleAction.h
175 LightApp_OBSelector.h
177 LightApp_Preferences.h
178 LightApp_PreferencesDlg.h
179 LightApp_SelectionMgr.h
180 LightApp_ShowHideOp.h
183 LightApp_WgViewModel.h
184 LightApp_ExtInfoDlg.h
186 IF(SALOME_USE_GLVIEWER)
187 LIST(APPEND _moc_HEADERS LightApp_GLSelector.h)
189 IF(SALOME_USE_GRAPHICSVIEW)
190 LIST(APPEND _moc_HEADERS LightApp_GVSelector.h)
192 IF(SALOME_USE_OCCVIEWER)
193 LIST(APPEND _moc_HEADERS LightApp_OCCSelector.h)
195 IF(SALOME_USE_PV3DVIEWER)
196 IF(SALOME_USE_SALOMEOBJECT)
197 LIST(APPEND _moc_HEADERS LightApp_PV3DSelector.h)
200 IF(SALOME_USE_PLOT2DVIEWER)
201 LIST(APPEND _moc_HEADERS LightApp_Plot2dSelector.h)
203 IF(SALOME_USE_VTKVIEWER)
204 IF(SALOME_USE_SALOMEOBJECT)
205 LIST(APPEND _moc_HEADERS LightApp_VTKSelector.h)
208 IF(SALOME_USE_PYCONSOLE)
209 LIST(APPEND _moc_HEADERS LightApp_PyEditor.h)
212 # header files / no moc processing
215 LightApp_DataObject.h
217 LightApp_DataSubOwner.h
220 LightApp_EventFilter.h
221 LightApp_FileValidator.h
222 LightApp_FullScreenHelper.h
225 LightApp_UpdateFlags.h
228 # header files / to install
229 SET(LightApp_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
233 # resource files / to be processed by rcc
234 SET(_rcc_RESOURCES LightApp.qrc)
236 # resource files / to be processed by lrelease
238 resources/LightApp_images.ts
239 resources/LightApp_msg_en.ts
240 resources/LightApp_msg_fr.ts
241 resources/LightApp_msg_ja.ts
244 # resource files / static
246 resources/icon_about.png
247 resources/icon_applogo.png
248 resources/icon_default.png
249 resources/icon_module.png
250 resources/icon_select.png
251 resources/icon_earth.png
252 resources/icon_life_ring.png
253 resources/icon_add_module.png
254 resources/icon_remove_module.png
255 resources/icon_info_module.png
256 resources/LightApp.xml
261 # sources / moc wrappings
262 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
264 # sources / rcc wrappings
265 QT_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES})
269 LightApp_AboutDlg.cxx
270 LightApp_Application.cxx
271 LightApp_DataModel.cxx
272 LightApp_DataObject.cxx
273 LightApp_DataOwner.cxx
274 LightApp_DataSubOwner.cxx
276 LightApp_Displayer.cxx
278 LightApp_EventFilter.cxx
279 LightApp_FileValidator.cxx
280 LightApp_FullScreenHelper.cxx
281 LightApp_HDFDriver.cxx
283 LightApp_ModuleAction.cxx
284 LightApp_ModuleDlg.cxx
286 LightApp_OBSelector.cxx
287 LightApp_Operation.cxx
288 LightApp_Preferences.cxx
289 LightApp_PreferencesDlg.cxx
290 LightApp_Selection.cxx
291 LightApp_SelectionMgr.cxx
292 LightApp_ShowHideOp.cxx
294 LightApp_SwitchOp.cxx
295 LightApp_WgViewModel.cxx
296 LightApp_ExtInfoDlg.cxx
298 IF(SALOME_USE_GLVIEWER)
299 LIST(APPEND _other_SOURCES LightApp_GLSelector.cxx)
301 IF(SALOME_USE_GRAPHICSVIEW)
302 LIST(APPEND _other_SOURCES LightApp_GVSelector.cxx)
304 IF(SALOME_USE_OCCVIEWER)
305 LIST(APPEND _other_SOURCES LightApp_OCCSelector.cxx)
307 IF(SALOME_USE_PV3DVIEWER)
308 IF(SALOME_USE_SALOMEOBJECT)
309 LIST(APPEND _other_SOURCES LightApp_PV3DSelector.cxx)
312 IF(SALOME_USE_PLOT2DVIEWER)
313 LIST(APPEND _other_SOURCES LightApp_Plot2dSelector.cxx)
315 IF(SALOME_USE_VTKVIEWER)
316 IF(SALOME_USE_SALOMEOBJECT)
317 LIST(APPEND _other_SOURCES LightApp_VTKSelector.cxx)
320 IF(SALOME_USE_PYCONSOLE)
321 LIST(APPEND _other_SOURCES LightApp_PyEditor.cxx)
324 # sources / to compile
325 SET(LightApp_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_rcc_SOURCES})
329 ADD_LIBRARY(LightApp ${LightApp_SOURCES})
330 TARGET_LINK_LIBRARIES(LightApp ${_link_LIBRARIES})
331 INSTALL(TARGETS LightApp EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
333 INSTALL(FILES ${LightApp_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
334 QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}")
336 INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})