1 # Copyright (C) 2012-2022 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
24 # additional include directories
26 ${OpenCASCADE_INCLUDE_DIR}
29 ${PTHREAD_INCLUDE_DIR}
31 ${PROJECT_SOURCE_DIR}/src/CAM
32 ${PROJECT_SOURCE_DIR}/src/CASCatch
33 ${PROJECT_SOURCE_DIR}/src/Event
34 ${PROJECT_SOURCE_DIR}/src/LogWindow
35 ${PROJECT_SOURCE_DIR}/src/ObjBrowser
36 ${PROJECT_SOURCE_DIR}/src/Prs
37 ${PROJECT_SOURCE_DIR}/src/Qtx
38 ${PROJECT_SOURCE_DIR}/src/STD
39 ${PROJECT_SOURCE_DIR}/src/SUIT
40 ${PROJECT_SOURCE_DIR}/src/Style
42 IF(SALOME_USE_SALOMEOBJECT)
43 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/OBJECT)
45 IF(SALOME_USE_GLVIEWER)
46 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/GLViewer)
48 IF(SALOME_USE_GRAPHICSVIEW)
49 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/GraphicsView)
51 IF(SALOME_USE_PYVIEWER)
52 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/PyEditor)
53 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/PyViewer)
55 IF(SALOME_USE_OCCVIEWER)
56 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/OCCViewer)
57 IF(SALOME_USE_SALOMEOBJECT)
58 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/SOCC)
61 IF(SALOME_USE_PLOT2DVIEWER)
62 INCLUDE_DIRECTORIES(${QWT_INCLUDE_DIR})
63 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/Plot2d)
64 IF(SALOME_USE_SALOMEOBJECT)
65 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/SPlot2d)
68 IF(SALOME_USE_VTKVIEWER)
69 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/VTKViewer)
70 IF(SALOME_USE_SALOMEOBJECT)
71 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/SVTK)
74 IF(SALOME_USE_QXGRAPHVIEWER)
75 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/QxScene)
77 IF(SALOME_USE_PVVIEWER)
78 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/PVViewer)
80 IF(SALOME_USE_PYCONSOLE)
82 ${PYTHON_INCLUDE_DIRS}
83 ${PROJECT_SOURCE_DIR}/tools/PyConsole/src
84 ${PROJECT_SOURCE_DIR}/tools/PyInterp/src
85 ${PROJECT_SOURCE_DIR}/src/SUITApp
89 # additional preprocessor / compiler flags
90 ADD_DEFINITIONS(${OpenCASCADE_DEFINITIONS} ${QT_DEFINITIONS} ${HDF5_DEFINITIONS})
91 IF(SALOME_USE_PLOT2DVIEWER)
92 ADD_DEFINITIONS(${QWT_DEFINITIONS})
94 IF(SALOME_USE_PYCONSOLE)
95 ADD_DEFINITIONS(${PYTHON_DEFINITIONS})
98 # libraries to link to
100 ${OpenCASCADE_FoundationClasses_LIBRARIES}
103 CASCatch qtx suit std SalomeStyle SalomePrs CAM LogWindow ObjBrowser Event
104 ${KERNEL_SalomeHDFPersist} ${KERNEL_SALOMELocalTrace}
106 IF(SALOME_USE_SALOMEOBJECT)
107 LIST(APPEND _link_LIBRARIES SalomeObject)
109 IF(SALOME_USE_GLVIEWER)
110 LIST(APPEND _link_LIBRARIES GLViewer)
112 IF(SALOME_USE_GRAPHICSVIEW)
113 LIST(APPEND _link_LIBRARIES GraphicsView)
115 IF(SALOME_USE_PYVIEWER)
116 LIST(APPEND _link_LIBRARIES PyEditor PyViewer)
118 IF(SALOME_USE_OCCVIEWER)
119 LIST(APPEND _link_LIBRARIES OCCViewer)
120 IF(SALOME_USE_SALOMEOBJECT)
121 LIST(APPEND _link_LIBRARIES SOCC)
124 IF(SALOME_USE_PLOT2DVIEWER)
125 LIST(APPEND _link_LIBRARIES Plot2d)
126 IF(SALOME_USE_SALOMEOBJECT)
127 LIST(APPEND _link_LIBRARIES SPlot2d)
130 IF(SALOME_USE_VTKVIEWER)
131 LIST(APPEND _link_LIBRARIES VTKViewer)
132 IF(SALOME_USE_SALOMEOBJECT)
133 LIST(APPEND _link_LIBRARIES SVTK)
136 IF(SALOME_USE_QXGRAPHVIEWER)
137 LIST(APPEND _link_LIBRARIES QxScene)
139 IF(SALOME_USE_PVVIEWER)
140 LIST(APPEND _link_LIBRARIES PVViewer)
142 IF(SALOME_USE_PYCONSOLE)
143 LIST(APPEND _link_LIBRARIES PyInterp PyConsole SUITApp)
148 # header files / to be processed by moc
151 LightApp_Application.h
155 LightApp_ModuleAction.h
158 LightApp_OBSelector.h
160 LightApp_Preferences.h
161 LightApp_PreferencesDlg.h
162 LightApp_SelectionMgr.h
163 LightApp_ShowHideOp.h
166 LightApp_WgViewModel.h
168 IF(SALOME_USE_GLVIEWER)
169 LIST(APPEND _moc_HEADERS LightApp_GLSelector.h)
171 IF(SALOME_USE_GRAPHICSVIEW)
172 LIST(APPEND _moc_HEADERS LightApp_GVSelector.h)
174 IF(SALOME_USE_OCCVIEWER)
175 LIST(APPEND _moc_HEADERS LightApp_OCCSelector.h)
177 IF(SALOME_USE_PLOT2DVIEWER)
178 LIST(APPEND _moc_HEADERS LightApp_Plot2dSelector.h)
180 IF(SALOME_USE_VTKVIEWER)
181 IF(SALOME_USE_SALOMEOBJECT)
182 LIST(APPEND _moc_HEADERS LightApp_VTKSelector.h)
185 IF(SALOME_USE_PYCONSOLE)
186 LIST(APPEND _moc_HEADERS LightApp_PyEditor.h)
189 # header files / no moc processing
192 LightApp_DataObject.h
194 LightApp_DataSubOwner.h
197 LightApp_EventFilter.h
198 LightApp_FileValidator.h
199 LightApp_FullScreenHelper.h
202 LightApp_UpdateFlags.h
205 # header files / to install
206 SET(LightApp_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
210 # resource files / to be processed by rcc
211 SET(_rcc_RESOURCES LightApp.qrc)
213 # resource files / to be processed by lrelease
215 resources/LightApp_images.ts
216 resources/LightApp_msg_en.ts
217 resources/LightApp_msg_fr.ts
218 resources/LightApp_msg_ja.ts
221 # resource files / static
223 resources/icon_about.png
224 resources/icon_applogo.png
225 resources/icon_default.png
226 resources/icon_module.png
227 resources/icon_module_big.png
228 resources/icon_select.png
229 resources/icon_earth.png
230 resources/icon_life_ring.png
231 resources/LightApp.xml
236 # sources / moc wrappings
237 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
239 # sources / rcc wrappings
240 QT_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES})
244 LightApp_AboutDlg.cxx
245 LightApp_Application.cxx
246 LightApp_DataModel.cxx
247 LightApp_DataObject.cxx
248 LightApp_DataOwner.cxx
249 LightApp_DataSubOwner.cxx
251 LightApp_Displayer.cxx
253 LightApp_EventFilter.cxx
254 LightApp_FileValidator.cxx
255 LightApp_FullScreenHelper.cxx
256 LightApp_HDFDriver.cxx
258 LightApp_ModuleAction.cxx
259 LightApp_ModuleDlg.cxx
261 LightApp_OBSelector.cxx
262 LightApp_Operation.cxx
263 LightApp_Preferences.cxx
264 LightApp_PreferencesDlg.cxx
265 LightApp_Selection.cxx
266 LightApp_SelectionMgr.cxx
267 LightApp_ShowHideOp.cxx
269 LightApp_SwitchOp.cxx
270 LightApp_WgViewModel.cxx
272 IF(SALOME_USE_GLVIEWER)
273 LIST(APPEND _other_SOURCES LightApp_GLSelector.cxx)
275 IF(SALOME_USE_GRAPHICSVIEW)
276 LIST(APPEND _other_SOURCES LightApp_GVSelector.cxx)
278 IF(SALOME_USE_OCCVIEWER)
279 LIST(APPEND _other_SOURCES LightApp_OCCSelector.cxx)
281 IF(SALOME_USE_PLOT2DVIEWER)
282 LIST(APPEND _other_SOURCES LightApp_Plot2dSelector.cxx)
284 IF(SALOME_USE_VTKVIEWER)
285 IF(SALOME_USE_SALOMEOBJECT)
286 LIST(APPEND _other_SOURCES LightApp_VTKSelector.cxx)
289 IF(SALOME_USE_PYCONSOLE)
290 LIST(APPEND _other_SOURCES LightApp_PyEditor.cxx)
293 # sources / to compile
294 SET(LightApp_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_rcc_SOURCES})
298 ADD_LIBRARY(LightApp ${LightApp_SOURCES})
299 TARGET_LINK_LIBRARIES(LightApp ${_link_LIBRARIES})
300 INSTALL(TARGETS LightApp EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
302 INSTALL(FILES ${LightApp_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
303 QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}")
305 INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})