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