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}
30 ${KERNEL_INCLUDE_DIRS}
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
43 IF(SALOME_USE_SALOMEOBJECT)
44 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/OBJECT)
46 IF(SALOME_USE_GLVIEWER)
47 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/GLViewer)
49 IF(SALOME_USE_OCCVIEWER)
50 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/OCCViewer)
51 IF(SALOME_USE_SALOMEOBJECT)
52 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/SOCC)
55 IF(SALOME_USE_PLOT2DVIEWER)
56 INCLUDE_DIRECTORIES(${QWT_INCLUDE_DIR})
57 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/Plot2d)
58 IF(SALOME_USE_SALOMEOBJECT)
59 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/SPlot2d)
62 IF(SALOME_USE_VTKVIEWER)
63 INCLUDE_DIRECTORIES(${VTK_INCLUDE_DIRS})
64 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/VTKViewer)
65 IF(SALOME_USE_SALOMEOBJECT)
66 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/SVTK)
69 IF(SALOME_USE_QXGRAPHVIEWER)
70 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/QxScene)
72 IF(SALOME_USE_PYCONSOLE)
74 ${PYTHON_INCLUDE_DIRS}
75 ${PROJECT_SOURCE_DIR}/src/PyConsole
76 ${PROJECT_SOURCE_DIR}/src/PyInterp
77 ${PROJECT_SOURCE_DIR}/src/SUITApp
81 # additional preprocessor / compiler flags
82 ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${HDF5_DEFINITIONS})
84 ADD_DEFINITIONS("-Wno-deprecated")
86 IF(NOT SALOME_USE_SALOMEOBJECT)
87 ADD_DEFINITIONS("-DDISABLE_SALOMEOBJECT")
89 IF (NOT SALOME_USE_GLVIEWER)
90 ADD_DEFINITIONS("-DDISABLE_GLVIEWER")
92 IF(NOT SALOME_USE_OCCVIEWER)
93 ADD_DEFINITIONS("-DDISABLE_OCCVIEWER")
95 IF(SALOME_USE_PLOT2DVIEWER)
96 ADD_DEFINITIONS(${QWT_DEFINITIONS})
98 ADD_DEFINITIONS("-DDISABLE_PLOT2DVIEWER")
100 IF(NOT SALOME_USE_VTKVIEWER)
101 ADD_DEFINITIONS("-DDISABLE_VTKVIEWER")
103 IF(NOT SALOME_USE_QXGRAPHVIEWER)
104 ADD_DEFINITIONS("-DDISABLE_QXGRAPHVIEWER")
106 IF(SALOME_USE_PYCONSOLE)
107 ADD_DEFINITIONS(${PYTHON_DEFINITIONS})
109 ADD_DEFINITIONS("-DDISABLE_PYCONSOLE")
112 # libraries to link to
117 CASCatch qtx suit std SalomeStyle SalomePrs CAM LogWindow ObjBrowser
118 ${KERNEL_SalomeHDFPersist} ${KERNEL_SALOMELocalTrace}
120 IF(SALOME_USE_SALOMEOBJECT)
121 LIST(APPEND _link_LIBRARIES SalomeObject)
123 IF(SALOME_USE_GLVIEWER)
124 LIST(APPEND _link_LIBRARIES GLViewer)
126 IF(SALOME_USE_OCCVIEWER)
127 LIST(APPEND _link_LIBRARIES OCCViewer)
128 IF(SALOME_USE_SALOMEOBJECT)
129 LIST(APPEND _link_LIBRARIES SOCC)
132 IF(SALOME_USE_PLOT2DVIEWER)
133 LIST(APPEND _link_LIBRARIES Plot2d)
134 IF(SALOME_USE_SALOMEOBJECT)
135 LIST(APPEND _link_LIBRARIES SPlot2d)
138 IF(SALOME_USE_VTKVIEWER)
139 LIST(APPEND _link_LIBRARIES VTKViewer)
140 IF(SALOME_USE_SALOMEOBJECT)
141 LIST(APPEND _link_LIBRARIES SVTK)
144 IF(SALOME_USE_QXGRAPHVIEWER)
145 LIST(APPEND _link_LIBRARIES QxScene)
147 IF(SALOME_USE_PYCONSOLE)
148 LIST(APPEND _link_LIBRARIES PyInterp PyConsole SUITApp)
153 # header files / to be processed by moc
156 LightApp_Application.h
160 LightApp_ModuleAction.h
163 LightApp_OBSelector.h
165 LightApp_Preferences.h
166 LightApp_PreferencesDlg.h
167 LightApp_SelectionMgr.h
168 LightApp_ShowHideOp.h
171 LightApp_WgViewModel.h
173 IF(SALOME_USE_GLVIEWER)
174 LIST(APPEND _moc_HEADERS LightApp_GLSelector.h)
176 IF(SALOME_USE_OCCVIEWER)
177 LIST(APPEND _moc_HEADERS LightApp_OCCSelector.h)
179 IF(SALOME_USE_PLOT2DVIEWER)
180 LIST(APPEND _moc_HEADERS LightApp_Plot2dSelector.h)
182 IF(SALOME_USE_VTKVIEWER)
183 IF(SALOME_USE_SALOMEOBJECT)
184 LIST(APPEND _moc_HEADERS LightApp_VTKSelector.h)
188 # header files / no moc processing
191 LightApp_DataObject.h
193 LightApp_DataSubOwner.h
196 LightApp_EventFilter.h
197 LightApp_FullScreenHelper.h
200 LightApp_UpdateFlags.h
202 IF(SALOME_USE_PYCONSOLE)
203 LIST(APPEND _other_HEADERS LightApp_PyInterp.h)
206 # header files / to install
207 SET(LightApp_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
211 # resource files / to be processed by rcc
212 SET(_rcc_RESOURCES LightApp.qrc)
214 # resource files / to be processed by lrelease
216 resources/LightApp_images.ts
217 resources/LightApp_msg_en.ts
218 resources/LightApp_msg_fr.ts
219 resources/LightApp_msg_ja.ts
222 # resource files / static
224 resources/icon_about.png
225 resources/icon_applogo.png
226 resources/icon_default.png
227 resources/icon_module.png
228 resources/icon_module_big.png
229 resources/icon_select.png
230 resources/LightApp.ini
231 resources/LightApp.xml
236 # sources / rcc wrappings
237 QT4_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES})
239 # sources / moc wrappings
240 QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
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_FullScreenHelper.cxx
255 LightApp_HDFDriver.cxx
257 LightApp_ModuleAction.cxx
258 LightApp_ModuleDlg.cxx
260 LightApp_OBSelector.cxx
261 LightApp_Operation.cxx
262 LightApp_Preferences.cxx
263 LightApp_PreferencesDlg.cxx
264 LightApp_Selection.cxx
265 LightApp_SelectionMgr.cxx
266 LightApp_ShowHideOp.cxx
268 LightApp_SwitchOp.cxx
269 LightApp_WgViewModel.cxx
271 IF(SALOME_USE_GLVIEWER)
272 LIST(APPEND _other_SOURCES LightApp_GLSelector.cxx)
274 IF(SALOME_USE_OCCVIEWER)
275 LIST(APPEND _other_SOURCES LightApp_OCCSelector.cxx)
277 IF(SALOME_USE_PLOT2DVIEWER)
278 LIST(APPEND _other_SOURCES LightApp_Plot2dSelector.cxx)
280 IF(SALOME_USE_VTKVIEWER)
281 IF(SALOME_USE_SALOMEOBJECT)
282 LIST(APPEND _other_SOURCES LightApp_VTKSelector.cxx)
285 IF(SALOME_USE_PYCONSOLE)
286 LIST(APPEND _other_SOURCES LightApp_PyInterp.cxx)
289 # sources / to compile
290 SET(LightApp_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_rcc_SOURCES})
294 ADD_LIBRARY(LightApp ${LightApp_SOURCES})
295 TARGET_LINK_LIBRARIES(LightApp ${_link_LIBRARIES})
296 INSTALL(TARGETS LightApp EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
298 INSTALL(FILES ${LightApp_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
299 QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}")
301 INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})