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