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