Salome HOME
Merge remote branch 'origin/hydro/imps_2015'
[modules/gui.git] / src / SVTK / CMakeLists.txt
1 # Copyright (C) 2012-2016  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(UseQtExt)
21 INCLUDE(${VTK_USE_FILE})
22
23 # --- options ---
24
25 # additional include directories
26 INCLUDE_DIRECTORIES(
27   ${CAS_INCLUDE_DIRS}
28   ${QT_INCLUDES}
29   ${Boost_INCLUDE_DIRS}
30   ${PTHREAD_INCLUDE_DIR}
31   ${PROJECT_SOURCE_DIR}/src/Qtx
32   ${PROJECT_SOURCE_DIR}/src/SUIT
33   ${PROJECT_SOURCE_DIR}/src/ViewerTools
34   ${PROJECT_SOURCE_DIR}/src/OBJECT
35   ${PROJECT_SOURCE_DIR}/src/Prs
36   ${PROJECT_SOURCE_DIR}/src/VTKViewer
37   ${PROJECT_SOURCE_DIR}/src/OpenGLUtils
38 )
39
40 # additional preprocessor / compiler flags
41 ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS})
42
43 # libraries to link to
44 SET(_link_LIBRARIES 
45   ${QT_LIBRARIES}
46   ${OPENGL_LIBRARIES}
47   ${VTK_LIBRARIES}
48   ${CAS_KERNEL} ${CAS_VIEWER}
49   ${KERNEL_OpUtil}
50   qtx suit ViewerTools SalomeObject SalomePrs VTKViewer OpenGLUtils
51 )
52
53 # --- headers ---
54
55 # header files / to be processed by moc
56 SET(_moc_HEADERS
57    SVTK_ComboAction.h
58    SVTK_FontWidget.h
59    SVTK_GenericRenderWindowInteractor.h
60    SVTK_RecorderDlg.h
61    SVTK_PsOptionsDlg.h  
62    SVTK_RenderWindowInteractor.h
63    SVTK_SetRotationPointDlg.h
64    SVTK_View.h
65    SVTK_ViewManager.h
66    SVTK_ViewModelBase.h
67    SVTK_ViewModel.h
68    SVTK_ViewParameterDlg.h
69    SVTK_ViewWindow.h
70 )
71
72 # header files / to be processed by moc / internal
73 # TODO: check for MSVS project
74 SET(_moc_internal_HEADERS
75   SVTK_CubeAxesDlg.h
76   SVTK_NonIsometricDlg.h
77   SVTK_UpdateRateDlg.h
78 )
79
80 # header files / no moc processing
81 SET(_other_HEADERS
82    SALOME_Actor.h
83    SVTK.h
84    SVTK_Actor.h
85    SVTK_AreaPicker.h
86    SVTK_CubeAxesActor2D.h
87    SVTK_DeviceActor.h
88    SVTK_Event.h
89    SVTK_Functor.h
90    SVTK_ImageWriter.h
91    SVTK_ImageWriterMgr.h
92    SVTK_InteractorStyle.h
93    SVTK_KeyFreeInteractorStyle.h
94    SVTK_Prs.h
95    SVTK_Recorder.h
96    SVTK_Renderer.h
97    SVTK_Selection.h
98    SVTK_SelectionEvent.h
99    SVTK_Selector.h
100    SVTK_SpaceMouse.h
101    SVTK_Utils.h
102 )
103
104 # header files / no moc processing / internal
105 # no processing currently: TODO: check for MSVS project
106 SET(_internal_HEADERS
107   SVTK_SelectorDef.h
108   SVTK_Trihedron.h
109   salomevtkPVAxesActor.h
110   salomevtkPVAxesWidget.h
111 )
112
113 # header files / to install
114 SET(SVTK_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
115
116 # --- resources ---
117
118 # resource files / to be processed by lrelease
119 SET(_ts_RESOURCES
120   resources/SVTK_msg_en.ts
121   resources/SVTK_msg_fr.ts
122   resources/SVTK_msg_ja.ts
123   resources/SVTK_images.ts
124 )
125
126 # resource files / static
127 SET(_other_RESOURCES
128   resources/vtk_view_graduated_axes.png
129   resources/vtk_view_highlight.png
130   resources/vtk_view_highlight_dyn.png
131   resources/vtk_view_highlight_off.png
132   resources/vtk_view_highlight_std.png
133   resources/vtk_view_parallel.png
134   resources/vtk_view_parameters.png
135   resources/vtk_view_perspective.png
136   resources/vtk_view_recording_pause.png
137   resources/vtk_view_recording_play.png
138   resources/vtk_view_recording_start.png
139   resources/vtk_view_recording_stop.png
140   resources/vtk_view_rotation_point.png
141   resources/vtk_view_scaling.png
142   resources/vtk_view_selection.png
143   resources/vtk_view_stereo.png
144   resources/vtk_view_style_switch.png
145   resources/vtk_view_update_rate.png
146   resources/vtk_view_zooming_style_switch.png
147 )
148
149 # --- sources ---
150
151 # sources / moc wrappings
152 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS} ${_moc_internal_HEADERS})
153
154 # sources / static
155 SET(_other_SOURCES
156   SALOME_Actor.cxx
157   SVTK_Actor.cxx
158   SVTK_AreaPicker.cxx
159   SVTK_ComboAction.cxx
160   SVTK_CubeAxesActor2D.cxx
161   SVTK_CubeAxesDlg.cxx
162   SVTK_DeviceActor.cxx
163   SVTK_FontWidget.cxx
164   SVTK_GenericRenderWindowInteractor.cxx
165   SVTK_ImageWriter.cxx
166   SVTK_ImageWriterMgr.cxx
167   SVTK_InteractorStyle.cxx
168   SVTK_KeyFreeInteractorStyle.cxx
169   SVTK_NonIsometricDlg.cxx
170   SVTK_Prs.cxx
171   SVTK_Recorder.cxx
172   SVTK_RecorderDlg.cxx
173   SVTK_PsOptionsDlg.cxx
174   SVTK_RenderWindowInteractor.cxx
175   SVTK_Renderer.cxx
176   SVTK_Selector.cxx
177   SVTK_SetRotationPointDlg.cxx
178   SVTK_SpaceMouse.cxx
179   SVTK_Trihedron.cxx
180   SVTK_UpdateRateDlg.cxx
181   SVTK_Utils.cxx
182   SVTK_View.cxx
183   SVTK_ViewManager.cxx
184   SVTK_ViewModel.cxx
185   SVTK_ViewParameterDlg.cxx
186   SVTK_ViewWindow.cxx
187   salomevtkPVAxesActor.cxx
188   salomevtkPVAxesWidget.cxx
189 )
190
191 # sources / to compile
192 SET(SVTK_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
193
194 # --- rules ---
195
196 ADD_LIBRARY(SVTK ${SVTK_SOURCES})
197 TARGET_LINK_LIBRARIES(SVTK ${_link_LIBRARIES})
198 INSTALL(TARGETS SVTK EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
199
200 INSTALL(FILES ${SVTK_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
201 QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}")
202
203 INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})