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