Salome HOME
Add tests for drag and drop algo.
[modules/hydro.git] / src / HYDROGUI / CMakeLists.txt
1 #include(../../CMake/Common.cmake)
2 include(../../CMake/UseQT4EXT.cmake)
3
4 set(PROJECT_HEADERS 
5     HYDROGUI.h
6     HYDROGUI_AbstractDisplayer.h
7     HYDROGUI_AISTrihedron.h
8     HYDROGUI_CalculationDlg.h
9     HYDROGUI_CalculationOp.h
10     HYDROGUI_ChannelDlg.h
11     HYDROGUI_ChannelOp.h
12     HYDROGUI_ColorWidget.h
13     HYDROGUI_CopyPasteOp.h
14     HYDROGUI_CopyPastePositionOp.h
15     HYDROGUI_DataBrowser.h
16     HYDROGUI_DataModel.h
17     HYDROGUI_DataObject.h
18     HYDROGUI_DeleteDlg.h
19     HYDROGUI_DeleteOp.h
20     HYDROGUI_DigueDlg.h
21     HYDROGUI_DigueOp.h
22     HYDROGUI_Displayer.h
23     HYDROGUI_ExportImageOp.h
24     HYDROGUI_GVSelector.h
25     HYDROGUI_ImmersibleZoneDlg.h
26     HYDROGUI_ImmersibleZoneOp.h
27     HYDROGUI_ImportBathymetryDlg.h
28     HYDROGUI_ImportBathymetryOp.h
29     HYDROGUI_ImportImageDlg.h
30     HYDROGUI_ImportImageOp.h
31     HYDROGUI_InputPanel.h
32     HYDROGUI_Module.h
33     HYDROGUI_NameValidator.h
34     HYDROGUI_ObjSelector.h
35     HYDROGUI_ObserveImageOp.h
36     HYDROGUI_OCCDisplayer.h
37     HYDROGUI_OCCSelector.h
38     HYDROGUI_Operation.h
39     HYDROGUI_Operations.h
40     HYDROGUI_Poly3DDlg.h
41     HYDROGUI_Poly3DOp.h
42     HYDROGUI_PolylineDlg.h
43     HYDROGUI_PolylineOp.h
44     HYDROGUI_ProfileDlg.h
45     HYDROGUI_ProfileOp.h
46     HYDROGUI_Prs.h
47     HYDROGUI_PrsDriver.h
48     HYDROGUI_PrsImage.h
49     HYDROGUI_PrsImageDriver.h
50     HYDROGUI_PrsImageFrame.h
51     HYDROGUI_PrsPolyline.h
52     HYDROGUI_PrsPolylineDriver.h
53     HYDROGUI_PrsZone.h
54     HYDROGUI_PrsZoneDriver.h
55     HYDROGUI_Region.h
56     HYDROGUI_RemoveImageRefsOp.h
57     HYDROGUI_Shape.h
58     HYDROGUI_ShowHideOp.h
59     HYDROGUI_StreamDlg.h
60     HYDROGUI_StreamOp.h
61     HYDROGUI_Tool.h
62     HYDROGUI_TwoImagesDlg.h
63     HYDROGUI_TwoImagesOp.h
64     HYDROGUI_UpdateFlags.h
65     HYDROGUI_UpdateObjectOp.h
66     HYDROGUI_VisualStateOp.h
67     HYDROGUI_VTKPrs.h
68     HYDROGUI_VTKPrsBathymetry.h
69     HYDROGUI_VTKPrsBathymetryDriver.h
70     HYDROGUI_VTKPrsDisplayer.h
71     HYDROGUI_VTKPrsDriver.h
72     HYDROGUI_VTKPrsShape.h
73     HYDROGUI_VTKPrsShapeDriver.h
74     HYDROGUI_Wizard.h
75     HYDROGUI_Zone.h
76     HYDROGUI_ImportGeomObjectOp.h
77     HYDROGUI_ImportObstacleFromFileOp.h
78     HYDROGUI_ExportCalculationOp.h
79     HYDROGUI_GeomObjectDlg.h
80     HYDROGUI_SetColorOp.h
81     HYDROGUI_ColorDlg.h
82     HYDROGUI_ImportProfilesOp.h
83     HYDROGUI_GeoreferencementDlg.h
84     HYDROGUI_GeoreferencementOp.h
85     HYDROGUI_Actor.h
86     HYDROGUI_BathymetryBoundsOp.h
87     HYDROGUI_TranslateObstacleDlg.h
88     HYDROGUI_TranslateObstacleOp.h
89     HYDROGUI_ZLevelsModel.h
90     HYDROGUI_ZLevelsDlg.h
91     HYDROGUI_ZLevelsOp.h
92 )
93
94 QT4_WRAP_CPP(PROJECT_HEADERS_MOC ${PROJECT_HEADERS})
95
96 set(PROJECT_SOURCES 
97     HYDROGUI_AbstractDisplayer.cxx
98     HYDROGUI_AISTrihedron.cxx
99     HYDROGUI_CalculationDlg.cxx
100     HYDROGUI_CalculationOp.cxx
101     HYDROGUI_ChannelDlg.cxx
102     HYDROGUI_ChannelOp.cxx
103     HYDROGUI_ColorWidget.cxx
104     HYDROGUI_CopyPasteOp.cxx
105     HYDROGUI_CopyPastePositionOp.cxx
106     HYDROGUI_DataBrowser.cxx
107     HYDROGUI_DataModel.cxx
108     HYDROGUI_DataObject.cxx
109     HYDROGUI_DeleteDlg.cxx
110     HYDROGUI_DeleteOp.cxx
111     HYDROGUI_DigueDlg.cxx
112     HYDROGUI_DigueOp.cxx
113     HYDROGUI_Displayer.cxx
114     HYDROGUI_ExportImageOp.cxx
115     HYDROGUI_GVSelector.cxx
116     HYDROGUI_ImmersibleZoneDlg.cxx
117     HYDROGUI_ImmersibleZoneOp.cxx
118     HYDROGUI_ImportBathymetryDlg.cxx
119     HYDROGUI_ImportBathymetryOp.cxx
120     HYDROGUI_ImportImageDlg.cxx
121     HYDROGUI_ImportImageOp.cxx
122     HYDROGUI_InputPanel.cxx
123     HYDROGUI_Module.cxx
124     HYDROGUI_NameValidator.cxx
125     HYDROGUI_ObjSelector.cxx
126     HYDROGUI_ObserveImageOp.cxx
127     HYDROGUI_OCCDisplayer.cxx
128     HYDROGUI_OCCSelector.cxx
129     HYDROGUI_Operation.cxx
130     HYDROGUI_Operations.cxx
131     HYDROGUI_Poly3DDlg.cxx
132     HYDROGUI_Poly3DOp.cxx
133     HYDROGUI_PolylineDlg.cxx
134     HYDROGUI_PolylineOp.cxx
135     HYDROGUI_ProfileDlg.cxx
136     HYDROGUI_ProfileOp.cxx
137     HYDROGUI_Prs.cxx
138     HYDROGUI_PrsDriver.cxx
139     HYDROGUI_PrsImage.cxx
140     HYDROGUI_PrsImageDriver.cxx
141     HYDROGUI_PrsImageFrame.cxx
142     HYDROGUI_PrsPolyline.cxx
143     HYDROGUI_PrsPolylineDriver.cxx
144     HYDROGUI_PrsZone.cxx
145     HYDROGUI_PrsZoneDriver.cxx
146     HYDROGUI_Region.cxx
147     HYDROGUI_RemoveImageRefsOp.cxx
148     HYDROGUI_Shape.cxx
149     HYDROGUI_ShowHideOp.cxx
150     HYDROGUI_StreamDlg.cxx
151     HYDROGUI_StreamOp.cxx
152     HYDROGUI_Tool.cxx
153     HYDROGUI_TwoImagesDlg.cxx
154     HYDROGUI_TwoImagesOp.cxx
155     HYDROGUI_UpdateObjectOp.cxx
156     HYDROGUI_VisualStateOp.cxx
157     HYDROGUI_VTKPrs.cxx
158     HYDROGUI_VTKPrsBathymetry.cxx
159     HYDROGUI_VTKPrsBathymetryDriver.cxx
160     HYDROGUI_VTKPrsDisplayer.cxx
161     HYDROGUI_VTKPrsDriver.cxx
162     HYDROGUI_VTKPrsShape.cxx
163     HYDROGUI_VTKPrsShapeDriver.cxx
164     HYDROGUI_Wizard.cxx
165     HYDROGUI_Zone.cxx
166     HYDROGUI_ImportGeomObjectOp.cxx
167     HYDROGUI_ImportObstacleFromFileOp.cxx
168     HYDROGUI_ExportCalculationOp.cxx
169     HYDROGUI_GeomObjectDlg.cxx
170     HYDROGUI_SetColorOp.cxx
171     HYDROGUI_ColorDlg.cxx
172     HYDROGUI_ImportProfilesOp.cxx
173     HYDROGUI_GeoreferencementDlg.cxx
174     HYDROGUI_GeoreferencementOp.cxx
175     HYDROGUI_Actor.cxx
176     HYDROGUI_BathymetryBoundsOp.cxx
177     HYDROGUI_TranslateObstacleDlg.cxx
178     HYDROGUI_TranslateObstacleOp.cxx
179     HYDROGUI_ZLevelsModel.cxx
180     HYDROGUI_ZLevelsDlg.cxx
181     HYDROGUI_ZLevelsOp.cxx
182 )
183
184 add_definitions(
185   -DHYDROGUI_EXPORTS
186   ${CAS_DEFINITIONS}
187   ${OMNIORB_DEFINITIONS}
188   ${QT_DEFINITIONS}
189 #  $(GUI_CXXFLAGS)
190   ${GUI_DEFINITIONS}
191 #  $(GEOM_CXXFLAGS)
192   ${GEOM_DEFINITIONS}
193 )
194
195 include_directories(
196   ${CAS_INCLUDE_DIRS}
197   ${QT_INCLUDES}
198 #  ${GUI_ROOT_DIR}/include/salome
199   ${GUI_INCLUDE_DIRS}
200 #  ${GEOM_ROOT_DIR}/include/salome
201   ${GEOM_INCLUDE_DIRS}
202   ${CMAKE_CURRENT_SOURCE_DIR}
203   ${CMAKE_CURRENT_SOURCE_DIR}/../HYDROData
204   ${CMAKE_CURRENT_SOURCE_DIR}/../HYDROCurveCreator
205   ${VTK_INCLUDE_DIRS}
206 )
207
208
209 add_library(HYDROGUI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${PROJECT_HEADERS_MOC})
210 target_link_libraries(HYDROGUI HYDROData HYDROCurveCreator
211     ${CAS_TKV3d} ${CAS_TKTopAlgo} ${CAS_TKBrep} ${CAS_TKBO}
212     ${GUI_LightApp} ${GUI_CAM} ${GUI_suit} ${GUI_qtx} ${GUI_ObjBrowser} ${GUI_GraphicsView} ${GUI_std} 
213     ${GUI_Event} ${GUI_OCCViewer} ${GEOM_GEOM} ${GEOM_GEOMBase}
214     ${VTK_LIBRARIES} ${SVTK} ${SalomeObject} ${SalomePrs}
215     )
216
217 INSTALL(TARGETS HYDROGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
218
219 set(PROJECT_LIBRARIES HYDROGUI)
220
221 set(GUITS_SOURCES
222   resources/HYDROGUI_images.ts
223   resources/HYDROGUI_msg_en.ts
224   resources/HYDROGUI_msg_fr.ts
225 )
226
227 #include(../../CMake/CommonInstall.cmake)
228
229 # resources
230 QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_HYDRO_INSTALL_RES_DATA}")
231
232 FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png")
233 FILE(GLOB GUIXML_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.xml")
234 SET(GUI_DATA ${GUIPNG_DATA} ${GUIXML_DATA})
235 INSTALL(FILES ${GUI_DATA} DESTINATION ${SALOME_HYDRO_INSTALL_RES_DATA})
236
237 # tests
238 if(SALOME_BUILD_TESTS)
239
240   set(TEST_HEADERS 
241     test_HYDROGUI_ZLevelsModel.h
242   )
243
244   set(TEST_SOURCES 
245     test_HYDROGUI_Main.cxx
246     test_HYDROGUI_ZLevelsModel.cxx    
247   )
248   
249   set(TEST_EXE test_HYDROGUI)
250   include(../../CMake/CPPUnitTests.cmake)
251   target_link_libraries(test_HYDROGUI ${CPPUNIT_LIBRARIES} HYDROData HYDROGUI)
252
253   INSTALL(TARGETS test_HYDROGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
254
255 endif(SALOME_BUILD_TESTS)
256