Salome HOME
f4fa5526dd37ea88117259e0a7eb29f2287563ba
[modules/smesh.git] / src / SMESHGUI / CMakeLists.txt
1 # Copyright (C) 2012-2020  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 INCLUDE(UseQtExt)
21
22 # --- options ---
23 # additional include directories
24 INCLUDE_DIRECTORIES(
25   ${QT_INCLUDES}
26   ${OGL_INCLUDE_DIRS}
27   ${OpenCASCADE_INCLUDE_DIR}
28   ${PYTHON_INCLUDE_DIRS}
29   ${KERNEL_INCLUDE_DIRS}
30   ${GUI_INCLUDE_DIRS}
31   ${QWT_INCLUDE_DIR}
32   ${GEOM_INCLUDE_DIRS}
33   ${MEDFILE_INCLUDE_DIRS}
34   ${Boost_INCLUDE_DIRS}
35   ${OMNIORB_INCLUDE_DIR}
36   ${HDF5_INCLUDE_DIRS}
37   ${PROJECT_SOURCE_DIR}/src/OBJECT
38   ${PROJECT_SOURCE_DIR}/src/SMESHFiltersSelection
39   ${PROJECT_SOURCE_DIR}/src/SMDS
40   ${PROJECT_SOURCE_DIR}/src/SMESHDS
41   ${PROJECT_SOURCE_DIR}/src/SMESHUtils
42   ${PROJECT_SOURCE_DIR}/src/Controls
43   ${PROJECT_SOURCE_DIR}/src/SMESHClient
44   ${PROJECT_SOURCE_DIR}/src/MEDWrapper
45   ${PROJECT_SOURCE_DIR}/src/ADAPT
46   ${PROJECT_SOURCE_DIR}/src/ADAPT_I
47   ${PROJECT_SOURCE_DIR}/src/ADAPTGUI
48   ${PROJECT_BINARY_DIR}
49   ${PROJECT_BINARY_DIR}/idl
50   ${PROJECT_BINARY_DIR}/src/ADAPTGUI
51   ${PROJECT_BINARY_DIR}/src/ADAPT_I
52   ${MEDCOUPLING_INCLUDE_DIRS}
53 )
54
55 # additional preprocessor / compiler flags
56 ADD_DEFINITIONS(
57   ${OpenCASCADE_DEFINITIONS}
58   ${BOOST_DEFINITIONS}
59   ${OMNIORB_DEFINITIONS}
60 )
61
62 # To avoid GetObject macro definition on WIN32
63 IF(WIN32)
64   ADD_DEFINITIONS(-DNOGDI)
65 ENDIF(WIN32)
66
67 # libraries to link to
68 SET(_link_LIBRARIES
69   ${OpenCASCADE_Visualization_LIBRARIES}
70   ${GUI_SalomePrs}
71   ${GUI_suit}
72   ${GUI_SUITApp}
73   ${GUI_CAM}
74   ${GUI_std}
75   ${GEOM_GEOMBase}
76   ${GEOM_GEOMFiltersSelection}
77   ${GEOM_GEOMObject}
78   SMESHFiltersSelection
79   SMDS
80   SMESHControls
81   SMESHObject
82   ADAPTGUI
83   ADAPTImpl
84   ADAPTEngine
85   ${MEDCoupling_medloader}
86 )
87
88 # --- headers ---
89
90 # header files / to be processed by moc
91 SET(_moc_HEADERS
92   SMESHGUI.h
93   SMESHGUI_PatternWidget.h
94   SMESHGUI_MeshPatternDlg.h
95   SMESHGUI_CreatePatternDlg.h
96   SMESHGUI_NodesDlg.h
97   SMESHGUI_SpinBox.h
98   SMESHGUI_TransparencyDlg.h
99   SMESHGUI_ClippingDlg.h
100   SMESHGUI_GroupDlg.h
101   SMESHGUI_RemoveNodesDlg.h
102   SMESHGUI_RemoveElementsDlg.h
103   SMESHGUI_MeshInfo.h
104   SMESHGUI_Measurements.h
105   SMESHGUI_Preferences_ScalarBarDlg.h
106   SMESHGUI_AddMeshElementDlg.h
107   SMESHGUI_GroupOnShapeDlg.h
108   SMESHGUI_FileInfoDlg.h
109   SMESHGUI_FilterDlg.h
110   SMESHGUI_FilterLibraryDlg.h
111   SMESHGUI_SingleEditDlg.h
112   SMESHGUI_MultiEditDlg.h
113   SMESHGUI_DeleteGroupDlg.h
114   SMESHGUI_GroupOpDlg.h
115   SMESHGUI_FaceGroupsSeparatedByEdgesDlg.h
116   SMESHGUI_SmoothingDlg.h
117   SMESHGUI_RenumberingDlg.h
118   SMESHGUI_ExtrusionDlg.h
119   SMESHGUI_ExtrusionAlongPathDlg.h
120   SMESHGUI_RevolutionDlg.h
121   SMESHGUI_RotationDlg.h
122   SMESHGUI_TranslationDlg.h
123   SMESHGUI_ScaleDlg.h
124   SMESHGUI_OffsetDlg.h
125   SMESHGUI_SymmetryDlg.h
126   SMESHGUI_SewingDlg.h
127   SMESHGUI_DuplicateNodesDlg.h
128   SMESHGUI_MergeDlg.h
129   SMESHGUI_CreatePolyhedralVolumeDlg.h
130   SMESHGUI_Operation.h
131   SMESHGUI_SelectionOp.h
132   SMESHGUI_Dialog.h
133   SMESHGUI_MeshDlg.h
134   SMESHGUI_MeshOp.h
135   SMESHGUI_Hypotheses.h
136   SMESHGUI_ShapeByMeshDlg.h
137   SMESHGUI_AddQuadraticElementDlg.h
138   SMESHGUI_ConvToQuadDlg.h
139   SMESHGUI_ConvToQuadOp.h
140   SMESHGUI_BuildCompoundDlg.h
141   SMESHGUI_ComputeDlg.h
142   SMESHGUI_MakeNodeAtPointDlg.h
143   SMESHGUI_MeshInfosBox.h
144   SMESHGUI_Make2DFrom3DOp.h
145   SMESHGUI_FindElemByPointDlg.h
146   SMESHGUI_MeshOrderDlg.h
147   SMESHGUI_CopyMeshDlg.h
148   SMESHGUI_MeshOrderOp.h
149   SMESHGUI_PreviewDlg.h
150   SMESHGUI_ReorientFacesDlg.h
151   SMESHGUI_PropertiesDlg.h
152   SMESHGUI_Add0DElemsOnAllNodesDlg.h
153   SMESHGUI_FieldSelectorWdg.h
154   SMESHGUI_DisplayEntitiesDlg.h
155   SMESHGUI_SplitBiQuad.h
156   SMESHGUI_IdPreview.h
157   SMESHGUI_PreVisualObj.h
158   SMESHGUI_AdaptDlg.h
159   SMESHGUI_MG_ADAPTDRIVER.h
160   MG_ADAPTGUI.hxx # to replace in ../ADAPTGUI/
161 )
162
163 # header files / no moc processing
164 SET(_other_HEADERS
165   SMESHGUI_Operations.h
166   SMESHGUI_Utils.h
167   SMESHGUI_HypothesesUtils.h
168   SMESHGUI_Selection.h
169   SMESHGUI_VTKUtils.h
170   SMESHGUI_Displayer.h
171   SMESHGUI_GEOMGenUtils.h
172   SMESHGUI_MeshUtils.h
173   SMESHGUI_FilterUtils.h
174   SMESHGUI_PatternUtils.h
175   SMESHGUI_GroupUtils.h
176   SMESHGUI_XmlHandler.h
177   SMESHGUI_Filter.h
178   SMESHGUI_MeshEditPreview.h
179   SMESHGUI_IdValidator.h
180   SMESHGUI_FileValidator.h
181   SMESHGUI_SelectionProxy.h
182   SMESH_SMESHGUI.hxx
183   #~MG_ADAPT.hxx # to replace in ../ADAPT/
184 )
185
186 # header files / to install
187 SET(SMESH_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
188
189 # --- sources ---
190
191 # sources / moc wrappings
192 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
193
194 # sources / static
195 SET(_other_SOURCES
196   SMESHGUI.cxx
197   SMESHGUI_PatternWidget.cxx
198   SMESHGUI_MeshPatternDlg.cxx
199   SMESHGUI_CreatePatternDlg.cxx
200   SMESHGUI_NodesDlg.cxx
201   SMESHGUI_SpinBox.cxx
202   SMESHGUI_TransparencyDlg.cxx
203   SMESHGUI_ClippingDlg.cxx
204   SMESHGUI_GroupDlg.cxx
205   SMESHGUI_RemoveNodesDlg.cxx
206   SMESHGUI_RemoveElementsDlg.cxx
207   SMESHGUI_SelectionProxy.cxx
208   SMESHGUI_MeshInfo.cxx
209   SMESHGUI_Measurements.cxx
210   SMESHGUI_Preferences_ScalarBarDlg.cxx
211   SMESHGUI_AddMeshElementDlg.cxx
212   SMESHGUI_FilterDlg.cxx
213   SMESHGUI_FilterLibraryDlg.cxx
214   SMESHGUI_SingleEditDlg.cxx
215   SMESHGUI_MultiEditDlg.cxx
216   SMESHGUI_DeleteGroupDlg.cxx
217   SMESHGUI_GroupOpDlg.cxx
218   SMESHGUI_FaceGroupsSeparatedByEdgesDlg.cxx
219   SMESHGUI_SmoothingDlg.cxx
220   SMESHGUI_RenumberingDlg.cxx
221   SMESHGUI_ExtrusionDlg.cxx
222   SMESHGUI_ExtrusionAlongPathDlg.cxx
223   SMESHGUI_RevolutionDlg.cxx
224   SMESHGUI_RotationDlg.cxx
225   SMESHGUI_TranslationDlg.cxx
226   SMESHGUI_ScaleDlg.cxx
227   SMESHGUI_OffsetDlg.cxx
228   SMESHGUI_SymmetryDlg.cxx
229   SMESHGUI_SewingDlg.cxx
230   SMESHGUI_DuplicateNodesDlg.cxx
231   SMESHGUI_MergeDlg.cxx
232   SMESHGUI_CreatePolyhedralVolumeDlg.cxx
233   SMESHGUI_Operation.cxx
234   SMESHGUI_SelectionOp.cxx
235   SMESHGUI_Dialog.cxx
236   SMESHGUI_MeshDlg.cxx
237   SMESHGUI_MeshOp.cxx
238   SMESHGUI_Hypotheses.cxx
239   SMESHGUI_ShapeByMeshDlg.cxx
240   SMESHGUI_AddQuadraticElementDlg.cxx
241   SMESHGUI_ConvToQuadDlg.cxx
242   SMESHGUI_ConvToQuadOp.cxx
243   SMESHGUI_BuildCompoundDlg.cxx
244   SMESHGUI_ComputeDlg.cxx
245   SMESHGUI_MakeNodeAtPointDlg.cxx
246   SMESHGUI_GroupOnShapeDlg.cxx
247   SMESHGUI_FileInfoDlg.cxx
248   SMESHGUI_MeshInfosBox.cxx
249   SMESHGUI_Make2DFrom3DOp.cxx
250   SMESHGUI_FindElemByPointDlg.cxx
251   SMESHGUI_MeshOrderDlg.cxx
252   SMESHGUI_CopyMeshDlg.cxx
253   SMESHGUI_MeshOrderOp.cxx
254   SMESHGUI_PreviewDlg.cxx
255   SMESHGUI_ReorientFacesDlg.cxx
256   SMESHGUI_PropertiesDlg.cxx
257   SMESHGUI_Add0DElemsOnAllNodesDlg.cxx
258   SMESHGUI_Utils.cxx
259   SMESHGUI_HypothesesUtils.cxx
260   SMESHGUI_Selection.cxx
261   SMESHGUI_VTKUtils.cxx
262   SMESHGUI_Displayer.cxx
263   SMESHGUI_GEOMGenUtils.cxx
264   SMESHGUI_MeshUtils.cxx
265   SMESHGUI_FilterUtils.cxx
266   SMESHGUI_PatternUtils.cxx
267   SMESHGUI_GroupUtils.cxx
268   SMESHGUI_XmlHandler.cxx
269   SMESHGUI_Filter.cxx
270   SMESHGUI_MeshEditPreview.cxx
271   SMESHGUI_FileValidator.cxx
272   SMESHGUI_FieldSelectorWdg.cxx
273   SMESHGUI_DisplayEntitiesDlg.cxx
274   SMESHGUI_SplitBiQuad.cxx
275   SMESHGUI_PreVisualObj.cxx
276   SMESHGUI_IdPreview.cxx
277   SMESHGUI_AdaptDlg.cxx
278   SMESHGUI_MG_ADAPTDRIVER.cxx
279   MG_ADAPTGUI.cxx # to replace in ../ADAPTGUI/
280   #MG_ADAPT.cxx
281 )
282
283 # sources / to compile
284 SET(SMESH_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
285
286 # --- resources ---
287
288 # resource files / to be processed by lrelease
289 SET(_ts_RESOURCES
290   SMESH_images.ts
291   SMESH_msg_en.ts
292   SMESH_msg_fr.ts
293   SMESH_msg_ja.ts
294 )
295
296 # --- rules ---
297
298 ADD_LIBRARY(SMESH ${SMESH_SOURCES})
299 TARGET_LINK_LIBRARIES(SMESH ${_link_LIBRARIES} )
300 INSTALL(TARGETS SMESH EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
301
302 INSTALL(FILES ${SMESH_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
303
304 QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_SMESH_INSTALL_RES_DATA}")