1 # Copyright (C) 2012-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
24 # additional include directories
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(${VTK_INCLUDE_DIRS})
70 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/VTKViewer)
71 IF(SALOME_USE_SALOMEOBJECT)
72 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/SVTK)
75 IF(SALOME_USE_QXGRAPHVIEWER)
76 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/QxScene)
78 IF(SALOME_USE_PVVIEWER)
79 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/PVViewer)
81 IF(SALOME_USE_PYCONSOLE)
83 ${PYTHON_INCLUDE_DIRS}
84 ${PROJECT_SOURCE_DIR}/src/PyConsole
85 ${PROJECT_SOURCE_DIR}/src/PyInterp
86 ${PROJECT_SOURCE_DIR}/src/SUITApp
90 # additional preprocessor / compiler flags
91 ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${HDF5_DEFINITIONS})
92 IF(SALOME_USE_PLOT2DVIEWER)
93 ADD_DEFINITIONS(${QWT_DEFINITIONS})
95 IF(SALOME_USE_PYCONSOLE)
96 ADD_DEFINITIONS(${PYTHON_DEFINITIONS})
99 # libraries to link to
104 CASCatch qtx suit std SalomeStyle SalomePrs CAM LogWindow ObjBrowser Event
105 ${KERNEL_SalomeHDFPersist} ${KERNEL_SALOMELocalTrace}
107 IF(SALOME_USE_SALOMEOBJECT)
108 LIST(APPEND _link_LIBRARIES SalomeObject)
110 IF(SALOME_USE_GLVIEWER)
111 LIST(APPEND _link_LIBRARIES GLViewer)
113 IF(SALOME_USE_GRAPHICSVIEW)
114 LIST(APPEND _link_LIBRARIES GraphicsView)
116 IF(SALOME_USE_PYVIEWER)
117 LIST(APPEND _link_LIBRARIES PyEditor PyViewer)
119 IF(SALOME_USE_OCCVIEWER)
120 LIST(APPEND _link_LIBRARIES OCCViewer)
121 IF(SALOME_USE_SALOMEOBJECT)
122 LIST(APPEND _link_LIBRARIES SOCC)
125 IF(SALOME_USE_PLOT2DVIEWER)
126 LIST(APPEND _link_LIBRARIES Plot2d)
127 IF(SALOME_USE_SALOMEOBJECT)
128 LIST(APPEND _link_LIBRARIES SPlot2d)
131 IF(SALOME_USE_VTKVIEWER)
132 LIST(APPEND _link_LIBRARIES VTKViewer)
133 IF(SALOME_USE_SALOMEOBJECT)
134 LIST(APPEND _link_LIBRARIES SVTK)
137 IF(SALOME_USE_QXGRAPHVIEWER)
138 LIST(APPEND _link_LIBRARIES QxScene)
140 IF(SALOME_USE_PVVIEWER)
141 LIST(APPEND _link_LIBRARIES PVViewer)
143 IF(SALOME_USE_PYCONSOLE)
144 LIST(APPEND _link_LIBRARIES PyInterp PyConsole SUITApp)
149 # header files / to be processed by moc
152 LightApp_Application.h
156 LightApp_ModuleAction.h
159 LightApp_OBSelector.h
161 LightApp_Preferences.h
162 LightApp_PreferencesDlg.h
163 LightApp_SelectionMgr.h
164 LightApp_ShowHideOp.h
167 LightApp_WgViewModel.h
169 IF(SALOME_USE_GLVIEWER)
170 LIST(APPEND _moc_HEADERS LightApp_GLSelector.h)
172 IF(SALOME_USE_GRAPHICSVIEW)
173 LIST(APPEND _moc_HEADERS LightApp_GVSelector.h)
175 IF(SALOME_USE_OCCVIEWER)
176 LIST(APPEND _moc_HEADERS LightApp_OCCSelector.h)
178 IF(SALOME_USE_PLOT2DVIEWER)
179 LIST(APPEND _moc_HEADERS LightApp_Plot2dSelector.h)
181 IF(SALOME_USE_VTKVIEWER)
182 IF(SALOME_USE_SALOMEOBJECT)
183 LIST(APPEND _moc_HEADERS LightApp_VTKSelector.h)
187 # header files / no moc processing
190 LightApp_DataObject.h
192 LightApp_DataSubOwner.h
195 LightApp_EventFilter.h
196 LightApp_FullScreenHelper.h
199 LightApp_UpdateFlags.h
201 IF(SALOME_USE_PYCONSOLE)
202 LIST(APPEND _other_HEADERS LightApp_PyInterp.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/LightApp.ini
230 resources/LightApp.xml
235 # sources / rcc wrappings
236 QT4_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES})
238 # sources / moc wrappings
239 QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
243 LightApp_AboutDlg.cxx
244 LightApp_Application.cxx
245 LightApp_DataModel.cxx
246 LightApp_DataObject.cxx
247 LightApp_DataOwner.cxx
248 LightApp_DataSubOwner.cxx
250 LightApp_Displayer.cxx
252 LightApp_EventFilter.cxx
253 LightApp_FullScreenHelper.cxx
254 LightApp_HDFDriver.cxx
256 LightApp_ModuleAction.cxx
257 LightApp_ModuleDlg.cxx
259 LightApp_OBSelector.cxx
260 LightApp_Operation.cxx
261 LightApp_Preferences.cxx
262 LightApp_PreferencesDlg.cxx
263 LightApp_Selection.cxx
264 LightApp_SelectionMgr.cxx
265 LightApp_ShowHideOp.cxx
267 LightApp_SwitchOp.cxx
268 LightApp_WgViewModel.cxx
270 IF(SALOME_USE_GLVIEWER)
271 LIST(APPEND _other_SOURCES LightApp_GLSelector.cxx)
273 IF(SALOME_USE_GRAPHICSVIEW)
274 LIST(APPEND _other_SOURCES LightApp_GVSelector.cxx)
276 IF(SALOME_USE_OCCVIEWER)
277 LIST(APPEND _other_SOURCES LightApp_OCCSelector.cxx)
279 IF(SALOME_USE_PLOT2DVIEWER)
280 LIST(APPEND _other_SOURCES LightApp_Plot2dSelector.cxx)
282 IF(SALOME_USE_VTKVIEWER)
283 IF(SALOME_USE_SALOMEOBJECT)
284 LIST(APPEND _other_SOURCES LightApp_VTKSelector.cxx)
287 IF(SALOME_USE_PYCONSOLE)
288 LIST(APPEND _other_SOURCES LightApp_PyInterp.cxx)
291 # sources / to compile
292 SET(LightApp_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_rcc_SOURCES})
296 ADD_LIBRARY(LightApp ${LightApp_SOURCES})
297 TARGET_LINK_LIBRARIES(LightApp ${_link_LIBRARIES})
298 INSTALL(TARGETS LightApp EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
300 INSTALL(FILES ${LightApp_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
301 QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}")
303 INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})