Salome HOME
Porting HEXABLOCK module on WIN32 platform.
[modules/hexablock.git] / src / HEXABLOCKGUI / 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 ADD_SUBDIRECTORY(MyDlgRef)
21
22 INCLUDE(UseQt4Ext)
23
24 # --- options ---
25 # additional include directories
26 INCLUDE_DIRECTORIES(
27   ${QT_INCLUDES}
28   ${PYTHON_INCLUDE_DIRS}
29   ${OMNIORB_INCLUDE_DIR}
30   ${LIBXML2_INCLUDE_DIR}
31   ${Boost_INCLUDE_DIRS}
32   ${CAS_INCLUDE_DIRS}
33   ${VTK_INCLUDE_DIRS}
34   ${KERNEL_INCLUDE_DIRS}
35   ${GUI_INCLUDE_DIRS}
36   ${GEOM_INCLUDE_DIRS}
37   ${PROJECT_BINARY_DIR}
38   ${PROJECT_BINARY_DIR}/idl
39   ${CMAKE_CURRENT_SOURCE_DIR}
40   ${CMAKE_CURRENT_BINARY_DIR}
41   ${CMAKE_CURRENT_SOURCE_DIR}/MyDlgRef
42   ${CMAKE_CURRENT_BINARY_DIR}/MyDlgRef
43   ${PROJECT_SOURCE_DIR}/src/HEXABLOCK
44 )
45
46 # additional preprocessor / compiler flags
47 ADD_DEFINITIONS(
48   ${BOOST_DEFINITIONS}
49   ${OMNIORB_DEFINITIONS}
50   ${CAS_DEFINITIONS}
51   ${KERNEL_DEFINITIONS}
52 )
53
54 IF(WIN32)
55  ADD_DEFINITIONS(-DNOGDI -DNOMINMAX)
56 ENDIF(WIN32)
57
58 # libraries to link to
59 SET(_link_LIBRARIES
60   ${CORBA_LIBS}
61   ${QT_LIBRARIES}
62   ${GEOM_SalomeIDLGEOM}
63   ${GEOM_GEOMBase}
64   ${GEOM_BasicGUI}
65   ${KERNEL_SalomeLifeCycleCORBA}
66   MyDlgRef
67   HEXABLOCKEngine
68 )
69
70 # --- headers ---
71
72 # header files / to be processed by moc
73 SET(_moc_HEADERS
74   HEXABLOCKGUI.hxx
75   HEXABLOCKGUI_VtkDocumentGraphicView.hxx
76   HEXABLOCKGUI_DocumentPanel.hxx
77   HEXABLOCKGUI_DocumentDelegate.hxx
78   HEXABLOCKGUI_DocumentSelectionModel.hxx
79   HEXABLOCKGUI_DocumentModel.hxx
80   kmodelindexproxymapper.hxx
81   klinkitemselectionmodel.hxx
82   MyBasicGUI_PointDlg.hxx
83   MyGEOMBase_Skeleton.hxx
84 )
85
86 # header files / no moc processing
87 SET(HEXABLOCK_HEADERS
88   HEXABLOCKGUI_Export.hxx
89   HEXABLOCKGUI.hxx
90 )
91
92 # --- sources ---
93
94 # sources / moc wrappings
95 QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
96
97 # sources / static
98 SET(_other_SOURCES
99   Resource.hxx
100   Resource.cxx
101   HEXABLOCKGUI_Exception.hxx
102   HEXABLOCKGUI_Exception.cxx
103   HEXABLOCKGUI_Trace.hxx
104   HEXABLOCKGUI_Trace.cxx
105   HEXABLOCKGUI_Resource.hxx
106   HEXABLOCKGUI_Resource.cxx
107   HEXABLOCKGUI_VtkDocumentGraphicView.hxx
108   HEXABLOCKGUI_VtkDocumentGraphicView.cxx
109   HEXABLOCKGUI_OccGraphicView.hxx
110   HEXABLOCKGUI_OccGraphicView.cxx
111   HEXABLOCKGUI_OCCSelector.h
112   HEXABLOCKGUI_OCCSelector.cxx
113   HEXABLOCKGUI_GraphicViewsHandler.hxx
114   HEXABLOCKGUI_GraphicViewsHandler.cxx
115   HEXABLOCKGUI_DocumentModel.hxx
116   HEXABLOCKGUI_DocumentModel.cxx
117   HEXABLOCKGUI_DocumentSelectionModel.hxx
118   HEXABLOCKGUI_DocumentSelectionModel.cxx
119   HEXABLOCKGUI_DocumentItem.hxx
120   HEXABLOCKGUI_DocumentItem.cxx
121   HEXABLOCKGUI_DocumentDelegate.hxx
122   HEXABLOCKGUI_DocumentDelegate.cxx
123   HEXABLOCKGUI_DocumentPanel.hxx
124   HEXABLOCKGUI_DocumentPanel.cxx
125   HEXABLOCKGUI_SalomeTools.hxx
126   HEXABLOCKGUI_SalomeTools.cxx
127   HEXABLOCKGUI.hxx
128   HEXABLOCKGUI.cxx
129   kmodelindexproxymapper.hxx
130   kmodelindexproxymapper.cxx
131   klinkitemselectionmodel.hxx
132   klinkitemselectionmodel.cxx
133   MyGEOMBase_Skeleton.hxx
134   MyGEOMBase_Skeleton.cxx
135   MyBasicGUI_PointDlg.hxx
136   MyBasicGUI_PointDlg.cxx
137 )
138
139 # uic files / to be processed by pyuic
140 SET(_pyuic_files
141   Vertex_QTD.ui
142   Edge_QTD.ui
143   Quad_QTD.ui
144   Hexa_QTD.ui
145   Vector_QTD.ui
146   Cylinder_QTD.ui
147   Pipe_QTD.ui
148   MakeGrid_QTD.ui
149   MakeCylinder_QTD.ui
150   MakePipe_QTD.ui
151   MakeCylinders_QTD.ui
152   MakePipes_QTD.ui
153   RemoveHexa_QTD.ui
154   PrismQuad_QTD.ui
155   JoinQuad_QTD.ui
156   Merge_QTD.ui
157   Disconnect_QTD.ui
158   CutEdge_QTD.ui
159   Transformation_QTD.ui
160   Symmetry_QTD.ui
161   Group_QTD.ui
162   Law_QTD.ui
163   Propagation_QTD.ui
164   QuadAssoc_QTD.ui
165   EdgeAssoc_QTD.ui
166   QuadRevolution_QTD.ui
167   MakeRind_QTD.ui
168   ReplaceHexa_QTD.ui
169   MakeHemiSphere_QTD.ui
170   ModelInfo_QTD.ui
171   AddShapeDialog_QTD.ui
172 )
173
174 # scripts / pyuic wrappings
175 QT4_WRAP_UI(_uic_HEADERS ${_pyuic_files})
176
177 # sources / to compile
178 SET(HEXABLOCK_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_uic_HEADERS})
179
180 # --- resources ---
181
182 # resource files / to be processed by lrelease
183 SET(_ts_RESOURCES
184   resources/HEXABLOCK_msg_en.ts
185   resources/HEXABLOCK_msg_fr.ts
186   resources/HEXABLOCK_icons.ts
187
188
189 SALOME_CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/resources/SalomeApp.xml.in ${CMAKE_CURRENT_BINARY_DIR}/resources/SalomeApp.xml INSTALL ${SALOME_HEXABLOCK_INSTALL_RES_DATA})
190 SALOME_CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/resources/HEXABLOCKCatalog.xml.in ${CMAKE_CURRENT_BINARY_DIR}/resources/HEXABLOCKCatalog.xml INSTALL ${SALOME_HEXABLOCK_INSTALL_RES_DATA})
191
192 # resource files / static
193 SET(_other_RESOURCES
194   resources/LightApp.xml
195   resources/ModuleHexablock.png
196   resources/ModuleHexablock15x15.png
197   resources/new_document.png
198   resources/load_document.png
199   resources/save_document.png
200   resources/add_vertex.png
201   resources/add_edge.png
202   resources/add_quad.png
203   resources/add_hexa.png
204   resources/add_vector.png
205   resources/add_cylinder.png
206   resources/add_pipe.png
207   resources/make_grid.png
208   resources/make_cylinder.png
209   resources/make_pipe.png
210   resources/make_cylinders.png
211   resources/make_pipes.png
212   resources/remove_hexa.png
213   resources/prism_quad.png
214   resources/join_quad.png
215   resources/merge.png
216   resources/disconnect.png
217   resources/cut_edge.png
218   resources/make_transformation.png
219   resources/make_symmetry.png
220   resources/perform_transformation.png
221   resources/perform_symmetry.png
222   resources/assoc_vertex.png
223   resources/assoc_edge.png
224   resources/assoc_quad.png
225   resources/add_geom.png
226   resources/model_info.png
227   resources/add_group.png
228   resources/remove_group.png
229   resources/add_law.png
230   resources/remove_law.png
231   resources/set_propagation.png
232   resources/compute_mesh.png
233   resources/point2.png
234   resources/pointonedge.png
235   resources/select1.png
236   resources/point3.png
237   resources/point_line_intersection.png 
238   resources/pointonface.png
239   resources/line.png
240   resources/build_wire.png
241   resources/quad_revolution.png
242   resources/replace_hexa.png
243   resources/make_hemisphere.png
244 )
245
246 # --- rules ---
247
248 ADD_LIBRARY(HEXABLOCK ${HEXABLOCK_SOURCES})
249 TARGET_LINK_LIBRARIES(HEXABLOCK ${_link_LIBRARIES} )
250 INSTALL(TARGETS HEXABLOCK EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
251
252 INSTALL(FILES ${HEXABLOCK_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
253
254 QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_HEXABLOCK_INSTALL_RES_DATA}")
255
256 INSTALL(FILES ${_other_RESOURCES}
257         DESTINATION ${SALOME_HEXABLOCK_INSTALL_RES_DATA})