1 # Copyright (C) 2012-2013 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.
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_OCCVIEWER)
52 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/OCCViewer)
53 IF(SALOME_USE_SALOMEOBJECT)
54 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/SOCC)
57 IF(SALOME_USE_PLOT2DVIEWER)
58 INCLUDE_DIRECTORIES(${QWT_INCLUDE_DIR})
59 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/Plot2d)
60 IF(SALOME_USE_SALOMEOBJECT)
61 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/SPlot2d)
64 IF(SALOME_USE_VTKVIEWER)
65 INCLUDE_DIRECTORIES(${VTK_INCLUDE_DIRS})
66 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/VTKViewer)
67 IF(SALOME_USE_SALOMEOBJECT)
68 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/SVTK)
71 IF(SALOME_USE_QXGRAPHVIEWER)
72 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/QxScene)
74 IF(SALOME_USE_PYCONSOLE)
76 ${PYTHON_INCLUDE_DIRS}
77 ${PROJECT_SOURCE_DIR}/src/PyConsole
78 ${PROJECT_SOURCE_DIR}/src/PyInterp
79 ${PROJECT_SOURCE_DIR}/src/SUITApp
83 # additional preprocessor / compiler flags
84 ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${HDF5_DEFINITIONS})
86 ADD_DEFINITIONS("-Wno-deprecated")
88 IF(NOT SALOME_USE_SALOMEOBJECT)
89 ADD_DEFINITIONS("-DDISABLE_SALOMEOBJECT")
91 IF (NOT SALOME_USE_GLVIEWER)
92 ADD_DEFINITIONS("-DDISABLE_GLVIEWER")
94 IF (NOT SALOME_USE_GRAPHICSVIEW)
95 ADD_DEFINITIONS("-DDISABLE_GRAPHICSVIEW")
97 IF(NOT SALOME_USE_OCCVIEWER)
98 ADD_DEFINITIONS("-DDISABLE_OCCVIEWER")
100 IF(SALOME_USE_PLOT2DVIEWER)
101 ADD_DEFINITIONS(${QWT_DEFINITIONS})
103 ADD_DEFINITIONS("-DDISABLE_PLOT2DVIEWER")
105 IF(NOT SALOME_USE_VTKVIEWER)
106 ADD_DEFINITIONS("-DDISABLE_VTKVIEWER")
108 IF(NOT SALOME_USE_QXGRAPHVIEWER)
109 ADD_DEFINITIONS("-DDISABLE_QXGRAPHVIEWER")
111 IF(SALOME_USE_PYCONSOLE)
112 ADD_DEFINITIONS(${PYTHON_DEFINITIONS})
114 ADD_DEFINITIONS("-DDISABLE_PYCONSOLE")
117 # libraries to link to
122 CASCatch qtx suit std SalomeStyle SalomePrs CAM LogWindow ObjBrowser
123 ${KERNEL_SalomeHDFPersist} ${KERNEL_SALOMELocalTrace}
125 IF(SALOME_USE_SALOMEOBJECT)
126 LIST(APPEND _link_LIBRARIES SalomeObject)
128 IF(SALOME_USE_GLVIEWER)
129 LIST(APPEND _link_LIBRARIES GLViewer)
131 IF(SALOME_USE_GRAPHICSVIEW)
132 LIST(APPEND _link_LIBRARIES GraphicsView)
134 IF(SALOME_USE_OCCVIEWER)
135 LIST(APPEND _link_LIBRARIES OCCViewer)
136 IF(SALOME_USE_SALOMEOBJECT)
137 LIST(APPEND _link_LIBRARIES SOCC)
140 IF(SALOME_USE_PLOT2DVIEWER)
141 LIST(APPEND _link_LIBRARIES Plot2d)
142 IF(SALOME_USE_SALOMEOBJECT)
143 LIST(APPEND _link_LIBRARIES SPlot2d)
146 IF(SALOME_USE_VTKVIEWER)
147 LIST(APPEND _link_LIBRARIES VTKViewer)
148 IF(SALOME_USE_SALOMEOBJECT)
149 LIST(APPEND _link_LIBRARIES SVTK)
152 IF(SALOME_USE_QXGRAPHVIEWER)
153 LIST(APPEND _link_LIBRARIES QxScene)
155 IF(SALOME_USE_PYCONSOLE)
156 LIST(APPEND _link_LIBRARIES PyInterp PyConsole SUITApp)
161 # header files / to be processed by moc
164 LightApp_Application.h
168 LightApp_ModuleAction.h
171 LightApp_OBSelector.h
173 LightApp_Preferences.h
174 LightApp_PreferencesDlg.h
175 LightApp_SelectionMgr.h
176 LightApp_ShowHideOp.h
179 LightApp_WgViewModel.h
181 IF(SALOME_USE_GLVIEWER)
182 LIST(APPEND _moc_HEADERS LightApp_GLSelector.h)
184 IF(SALOME_USE_GRAPHICSVIEW)
185 LIST(APPEND _moc_HEADERS LightApp_GVSelector.h)
187 IF(SALOME_USE_OCCVIEWER)
188 LIST(APPEND _moc_HEADERS LightApp_OCCSelector.h)
190 IF(SALOME_USE_PLOT2DVIEWER)
191 LIST(APPEND _moc_HEADERS LightApp_Plot2dSelector.h)
193 IF(SALOME_USE_VTKVIEWER)
194 IF(SALOME_USE_SALOMEOBJECT)
195 LIST(APPEND _moc_HEADERS LightApp_VTKSelector.h)
199 # header files / no moc processing
202 LightApp_DataObject.h
204 LightApp_DataSubOwner.h
207 LightApp_EventFilter.h
208 LightApp_FullScreenHelper.h
211 LightApp_UpdateFlags.h
213 IF(SALOME_USE_PYCONSOLE)
214 LIST(APPEND _other_HEADERS LightApp_PyInterp.h)
217 # header files / to install
218 SET(LightApp_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
222 # resource files / to be processed by rcc
223 SET(_rcc_RESOURCES LightApp.qrc)
225 # resource files / to be processed by lrelease
227 resources/LightApp_images.ts
228 resources/LightApp_msg_en.ts
229 resources/LightApp_msg_fr.ts
230 resources/LightApp_msg_ja.ts
233 # resource files / static
235 resources/icon_about.png
236 resources/icon_applogo.png
237 resources/icon_default.png
238 resources/icon_module.png
239 resources/icon_module_big.png
240 resources/icon_select.png
241 resources/LightApp.ini
242 resources/LightApp.xml
247 # sources / rcc wrappings
248 QT4_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES})
250 # sources / moc wrappings
251 QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
255 LightApp_AboutDlg.cxx
256 LightApp_Application.cxx
257 LightApp_DataModel.cxx
258 LightApp_DataObject.cxx
259 LightApp_DataOwner.cxx
260 LightApp_DataSubOwner.cxx
262 LightApp_Displayer.cxx
264 LightApp_EventFilter.cxx
265 LightApp_FullScreenHelper.cxx
266 LightApp_HDFDriver.cxx
268 LightApp_ModuleAction.cxx
269 LightApp_ModuleDlg.cxx
271 LightApp_OBSelector.cxx
272 LightApp_Operation.cxx
273 LightApp_Preferences.cxx
274 LightApp_PreferencesDlg.cxx
275 LightApp_Selection.cxx
276 LightApp_SelectionMgr.cxx
277 LightApp_ShowHideOp.cxx
279 LightApp_SwitchOp.cxx
280 LightApp_WgViewModel.cxx
282 IF(SALOME_USE_GLVIEWER)
283 LIST(APPEND _other_SOURCES LightApp_GLSelector.cxx)
285 IF(SALOME_USE_GRAPHICSVIEW)
286 LIST(APPEND _other_SOURCES LightApp_GVSelector.cxx)
288 IF(SALOME_USE_OCCVIEWER)
289 LIST(APPEND _other_SOURCES LightApp_OCCSelector.cxx)
291 IF(SALOME_USE_PLOT2DVIEWER)
292 LIST(APPEND _other_SOURCES LightApp_Plot2dSelector.cxx)
294 IF(SALOME_USE_VTKVIEWER)
295 IF(SALOME_USE_SALOMEOBJECT)
296 LIST(APPEND _other_SOURCES LightApp_VTKSelector.cxx)
299 IF(SALOME_USE_PYCONSOLE)
300 LIST(APPEND _other_SOURCES LightApp_PyInterp.cxx)
303 # sources / to compile
304 SET(LightApp_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_rcc_SOURCES})
308 ADD_LIBRARY(LightApp ${LightApp_SOURCES})
309 TARGET_LINK_LIBRARIES(LightApp ${_link_LIBRARIES})
310 INSTALL(TARGETS LightApp EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
312 INSTALL(FILES ${LightApp_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
313 QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}")
315 INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})