Salome HOME
Merge branch V7_3_1_BR
[modules/gui.git] / src / VTKViewer / CMakeLists.txt
1 # Copyright (C) 2012-2014  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(UseQt4Ext)
21 INCLUDE(${VTK_USE_FILE})
22
23 # --- options ---
24
25 # additional include directories
26 INCLUDE_DIRECTORIES(
27   ${CAS_INCLUDE_DIRS}
28   ${QT_INCLUDES}
29   ${PTHREAD_INCLUDE_DIR}
30   ${PROJECT_SOURCE_DIR}/src/Qtx
31   ${PROJECT_SOURCE_DIR}/src/SUIT
32 )
33
34 # additional preprocessor / compiler flags
35 ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS})
36
37 # libraries to link to
38 SET(_link_LIBRARIES ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${VTK_LIBRARIES} ${CAS_KERNEL} qtx suit ${KERNEL_SALOMELocalTrace})
39
40 # --- headers ---
41
42 # header files / to be processed by moc
43 SET(_moc_HEADERS   
44   VTKViewer_MarkerDlg.h
45   VTKViewer_MarkerWidget.h
46   VTKViewer_RenderWindow.h
47   VTKViewer_RenderWindowInteractor.h
48   VTKViewer_ViewManager.h
49   VTKViewer_ViewModel.h
50   VTKViewer_ViewWindow.h
51 )
52
53 # header files / no moc processing
54 SET(_other_HEADERS
55   VTKViewer.h
56   VTKViewer_Actor.h
57   VTKViewer_AppendFilter.h
58   VTKViewer_Algorithm.h
59   VTKViewer_ArcBuilder.h
60   VTKViewer_CellCenters.h
61   VTKViewer_CellLocationsArray.h
62   VTKViewer_ConvexTool.h
63   VTKViewer_DataSetMapper.h
64   VTKViewer_ExtractUnstructuredGrid.h
65   VTKViewer_Filter.h
66   VTKViewer_FramedTextActor.h
67   VTKViewer_Functor.h
68   VTKViewer_GeometryFilter.h
69   VTKViewer_InteractorStyle.h
70   VTKViewer_MarkerDef.h
71   VTKViewer_MarkerUtils.h
72   VTKViewer_OpenGLRenderer.h
73   VTKViewer_PolyDataMapper.h
74   VTKViewer_ShrinkFilter.h
75   VTKViewer_Texture.h
76   VTKViewer_Transform.h
77   VTKViewer_TransformFilter.h
78   VTKViewer_Trihedron.h
79   VTKViewer_Utilities.h
80 )
81
82 # header files / to install
83 SET(VTKViewer_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
84
85 # --- resources ---
86
87 # resource files / to be processed by rcc
88 SET(_rcc_RESOURCES VTKViewer.qrc)
89
90 # resource files / to be processed by lrelease
91 SET(_ts_RESOURCES
92   resources/VTKViewer_images.ts
93   resources/VTKViewer_msg_en.ts
94   resources/VTKViewer_msg_fr.ts
95   resources/VTKViewer_msg_ja.ts
96 )
97
98 # resource files / static
99 SET(_other_RESOURCES
100   resources/vtk_view_anticlockwise.png
101   resources/vtk_view_clockwise.png
102   resources/vtk_view_back.png
103   resources/vtk_view_bottom.png
104   resources/vtk_view_camera_dump.png
105   resources/vtk_view_fitall.png
106   resources/vtk_view_fitarea.png
107   resources/vtk_view_front.png
108   resources/vtk_view_glpan.png
109   resources/vtk_view_left.png
110   resources/vtk_view_pan.png
111   resources/vtk_view_reset.png
112   resources/vtk_view_right.png
113   resources/vtk_view_rotate.png
114   resources/vtk_view_top.png
115   resources/vtk_view_triedre.png
116   resources/vtk_view_zoom.png
117   resources/marker_1.png
118   resources/marker_2.png
119   resources/marker_3.png
120   resources/marker_4.png
121   resources/marker_5.png
122   resources/marker_6.png
123   resources/marker_7.png
124   resources/marker_8.png
125   resources/marker_9.png
126 )
127
128 # --- sources ---
129
130 # sources / rcc wrappings
131 QT4_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES})
132
133 # sources / moc wrappings
134 QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
135
136 # sources / static
137 SET(_other_SOURCES
138   VTKViewer_Actor.cxx
139   VTKViewer_Algorithm.cxx
140   VTKViewer_AppendFilter.cxx
141   VTKViewer_ArcBuilder.cxx
142   VTKViewer_CellCenters.cxx
143   VTKViewer_CellLocationsArray.cxx
144   VTKViewer_ConvexTool.cxx
145   VTKViewer_DataSetMapper.cxx
146   VTKViewer_ExtractUnstructuredGrid.cxx
147   VTKViewer_Filter.cxx
148   VTKViewer_FramedTextActor.cxx
149   VTKViewer_GeometryFilter.cxx
150   VTKViewer_InteractorStyle.cxx
151   VTKViewer_MarkerDlg.cxx
152   VTKViewer_MarkerUtils.cxx
153   VTKViewer_MarkerWidget.cxx
154   VTKViewer_OpenGLRenderer.cxx
155   VTKViewer_PolyDataMapper.cxx
156   VTKViewer_RenderWindow.cxx
157   VTKViewer_RenderWindowInteractor.cxx
158   VTKViewer_ShrinkFilter.cxx
159   VTKViewer_Texture.cxx
160   VTKViewer_Transform.cxx
161   VTKViewer_TransformFilter.cxx
162   VTKViewer_Trihedron.cxx
163   VTKViewer_Utilities.cxx
164   VTKViewer_ViewManager.cxx
165   VTKViewer_ViewModel.cxx
166   VTKViewer_ViewWindow.cxx
167 )
168
169 # sources / to compile
170 SET(VTKViewer_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_rcc_SOURCES})
171
172 # --- rules ---
173
174 ADD_LIBRARY(VTKViewer ${VTKViewer_SOURCES})
175 TARGET_LINK_LIBRARIES(VTKViewer ${_link_LIBRARIES})
176 INSTALL(TARGETS VTKViewer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
177
178 INSTALL(FILES ${VTKViewer_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
179 QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}")
180
181 INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})
182 FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png")
183 INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})
184
185 FILE(GLOB GUIVTI_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.vti")
186 INSTALL(FILES ${GUIVTI_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})
187
188 FILE(GLOB GUITXT_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.txt")
189 INSTALL(FILES ${GUITXT_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})
190
191
192