]> SALOME platform Git repositories - modules/gui.git/blob - src/SalomeApp/CMakeLists.txt
Salome HOME
According to cotech80 PyConsoleBase->PyConsole and PyConsole->SalomePyConsole
[modules/gui.git] / src / SalomeApp / CMakeLists.txt
1 # Copyright (C) 2012-2015  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
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.
7 #
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.
12 #
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
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 ADD_SUBDIRECTORY(pluginsdemo)
21 IF(SALOME_BUILD_TESTS)
22    ADD_SUBDIRECTORY(Test)
23 ENDIF()
24
25 INCLUDE(UseQtExt)
26 IF(SALOME_USE_VTKVIEWER)
27   INCLUDE(${VTK_USE_FILE})
28 ENDIF()
29
30 # --- options ---
31
32 # additional include directories
33 INCLUDE_DIRECTORIES(
34   ${CAS_INCLUDE_DIRS}
35   ${QT_INCLUDES}
36   ${QWT_INCLUDE_DIR}
37   ${Boost_INCLUDE_DIRS}
38   ${PTHREAD_INCLUDE_DIR}
39   ${OMNIORB_INCLUDE_DIR}
40   ${PROJECT_BINARY_DIR}/idl
41   ${PROJECT_SOURCE_DIR}/src/CAM
42   ${PROJECT_SOURCE_DIR}/src/CASCatch
43   ${PROJECT_SOURCE_DIR}/src/Event
44   ${PROJECT_SOURCE_DIR}/src/LightApp
45   ${PROJECT_SOURCE_DIR}/src/OBJECT
46   ${PROJECT_SOURCE_DIR}/src/ObjBrowser
47   ${PROJECT_SOURCE_DIR}/src/Prs
48   ${PROJECT_SOURCE_DIR}/src/Qtx
49   ${PROJECT_SOURCE_DIR}/src/STD
50   ${PROJECT_SOURCE_DIR}/src/SUIT
51   ${PROJECT_SOURCE_DIR}/src/SVTK
52   ${PROJECT_SOURCE_DIR}/src/TOOLSGUI
53   ${PROJECT_SOURCE_DIR}/src/VTKViewer
54 )
55
56 IF(SALOME_USE_PYCONSOLE)
57   INCLUDE_DIRECTORIES(
58     ${PYTHON_INCLUDE_DIRS}
59     ${PROJECT_SOURCE_DIR}/src/SalomePyConsole
60     ${PROJECT_SOURCE_DIR}/src/PyConsole
61     ${PROJECT_SOURCE_DIR}/src/PyInterp
62   )
63 ENDIF()
64
65 # additional preprocessor / compiler flags
66 ADD_DEFINITIONS(
67   ${QT_DEFINITIONS}
68   ${OMNIORB_DEFINITIONS}
69   ${QWT_DEFINITIONS}
70   ${CAS_DEFINITIONS}
71   ${BOOST_DEFINITIONS}
72 )
73
74 IF(SALOME_USE_PYCONSOLE)
75   ADD_DEFINITIONS(${PYTHON_DEFINITIONS})
76 ENDIF()
77
78 # libraries to link to
79 SET(_link_LIBRARIES
80   ${CAS_KERNEL}
81   ${QT_LIBRARIES}
82   ${PYTHON_LIBRARIES}
83   ${KERNEL_OpUtil} ${KERNEL_SALOMELocalTrace} ${KERNEL_SalomeDSClient} ${KERNEL_TOOLSDS}
84   CASCatch suit std CAM ObjBrowser SalomePrs Event
85   LogWindow LightApp SalomePrs ToolsGUI
86 )
87
88 IF(SALOME_USE_VTKVIEWER)
89   LIST(APPEND _link_LIBRARIES VTKViewer SVTK)
90 ENDIF()
91
92 IF(SALOME_USE_PYCONSOLE)
93   LIST(APPEND _link_LIBRARIES PyInterp SalomePyConsole)
94 ENDIF()
95
96 IF(SALOME_USE_GLVIEWER)
97   LIST(APPEND _link_LIBRARIES GLViewer)
98 ENDIF()
99
100 IF(SALOME_USE_PLOT2DVIEWER)
101   LIST(APPEND _link_LIBRARIES Plot2d)
102   IF(SALOME_USE_SALOMEOBJECT)
103     LIST(APPEND _link_LIBRARIES SPlot2d)
104   ENDIF(SALOME_USE_SALOMEOBJECT)
105 ENDIF(SALOME_USE_PLOT2DVIEWER)
106
107 IF(SALOME_USE_OCCVIEWER)
108   LIST(APPEND _link_LIBRARIES OCCViewer)
109   IF(SALOME_USE_SALOMEOBJECT)
110     LIST(APPEND _link_LIBRARIES SOCC)
111   ENDIF(SALOME_USE_SALOMEOBJECT)
112 ENDIF()
113
114 IF(SALOME_USE_PVVIEWER)
115   LIST(APPEND _link_LIBRARIES PVViewer)
116 ENDIF()
117
118 IF(SALOME_USE_SALOMEOBJECT)
119   LIST(APPEND _link_LIBRARIES SalomeObject)
120 ENDIF()
121
122 IF(NOT SALOME_LIGHT_ONLY)
123   LIST(APPEND _link_LIBRARIES SalomeIDLGUI)
124   LIST(APPEND _link_LIBRARIES ${KERNEL_SalomeContainer})
125   LIST(APPEND _link_LIBRARIES ${KERNEL_SalomeLifeCycleCORBA})
126 ENDIF()
127
128 # --- headers ---
129
130 # header files / to be processed by moc
131 SET(_moc_HEADERS   
132   SalomeApp_Application.h
133   SalomeApp_CheckFileDlg.h
134   SalomeApp_DataModel.h
135   SalomeApp_DoubleSpinBox.h
136   SalomeApp_ExitDlg.h
137   SalomeApp_IntSpinBox.h
138   SalomeApp_ListView.h
139   SalomeApp_LoadStudiesDlg.h
140   SalomeApp_Module.h
141   SalomeApp_Study.h
142   SalomeApp_StudyPropertiesDlg.h
143 )
144
145 IF(SALOME_USE_PYCONSOLE)
146   LIST(APPEND _moc_HEADERS SalomeApp_NoteBook.h)
147 ENDIF()
148
149 # header files / no moc processing
150 SET(_other_HEADERS
151   SalomeApp.h
152   SalomeApp_DataObject.h
153   SalomeApp_Engine_i.h
154   SalomeApp_ExceptionHandler.h
155   SalomeApp_Filter.h
156   SalomeApp_ImportOperation.h
157   SalomeApp_Tools.h
158   SalomeApp_TypeFilter.h
159   SalomeApp_VisualState.h
160 )
161
162 IF(SALOME_USE_PYCONSOLE)
163   LIST(APPEND _other_HEADERS SalomeApp_PyInterp.h)
164 ENDIF()
165
166 # header files / to install
167 SET(SalomeApp_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
168
169 # --- resources ---
170
171 # resource files / to be processed by lrelease
172 SET(_ts_RESOURCES
173   resources/SalomeApp_images.ts
174   resources/SalomeApp_msg_en.ts
175   resources/SalomeApp_msg_fr.ts
176   resources/SalomeApp_msg_ja.ts
177 )
178
179 # resource files / static
180 SET(_other_RESOURCES
181   resources/SalomeApp.ini
182   resources/SalomeApp.xml
183 )
184
185 # --- sources ---
186
187 # sources / moc wrappings
188 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
189
190 # sources / static
191 SET(_other_SOURCES
192   SalomeApp_Application.cxx
193   SalomeApp_CheckFileDlg.cxx
194   SalomeApp_DataModel.cxx
195   SalomeApp_DataObject.cxx
196   SalomeApp_DoubleSpinBox.cxx
197   SalomeApp_Engine_i.cxx
198   SalomeApp_ExceptionHandler.cxx
199   SalomeApp_ExitDlg.cxx
200   SalomeApp_Filter.cxx
201   SalomeApp_ImportOperation.cxx
202   SalomeApp_IntSpinBox.cxx
203   SalomeApp_ListView.cxx
204   SalomeApp_LoadStudiesDlg.cxx
205   SalomeApp_Module.cxx
206   SalomeApp_Study.cxx
207   SalomeApp_StudyPropertiesDlg.cxx
208   SalomeApp_Tools.cxx
209   SalomeApp_TypeFilter.cxx
210   SalomeApp_VisualState.cxx
211 )
212
213 IF(SALOME_USE_PYCONSOLE)
214   LIST(APPEND _other_SOURCES SalomeApp_PyInterp.cxx SalomeApp_NoteBook.cxx)
215 ENDIF()
216
217 # sources / to compile
218 SET(SalomeApp_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
219
220 # --- scripts ---
221
222 # scripts / bin
223 SET(_bin_SCRIPTS
224   addvars2notebook.py
225 )
226
227 # scripts / python
228 SET(_py_SCRIPTS
229   salome_pluginsmanager.py
230 )
231
232 # --- rules ---
233
234 ADD_LIBRARY(SalomeApp ${SalomeApp_SOURCES})
235 TARGET_LINK_LIBRARIES(SalomeApp ${_link_LIBRARIES})
236 INSTALL(TARGETS SalomeApp EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
237
238 INSTALL(FILES ${SalomeApp_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
239 QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}")
240
241 INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})
242
243 SALOME_INSTALL_SCRIPTS("${_py_SCRIPTS}"  ${SALOME_INSTALL_PYTHON})
244 SALOME_INSTALL_SCRIPTS("${_bin_SCRIPTS}" ${SALOME_INSTALL_SCRIPT_PYTHON})