Salome HOME
44e556c3425255cbf92d172fa5196ccbc8425cea
[modules/gui.git] / src / OCCViewer / CMakeLists.txt
1 # Copyright (C) 2007-2023  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
3 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 #
6 # This library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Lesser General Public
8 # License as published by the Free Software Foundation; either
9 # version 2.1 of the License, or (at your option) any later version.
10 #
11 # This library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 # Lesser General Public License for more details.
15 #
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this library; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 #
20 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #
22
23 INCLUDE(UseQtExt)
24
25 # --- options ---
26
27 # additional include directories
28 INCLUDE_DIRECTORIES(
29   ${OpenCASCADE_INCLUDE_DIR}
30   ${OGL_INCLUDE_DIRS}
31   ${QT_INCLUDES}
32   ${PTHREAD_INCLUDE_DIR}
33   ${PROJECT_SOURCE_DIR}/src/CASCatch
34   ${PROJECT_SOURCE_DIR}/src/Qtx
35   ${PROJECT_SOURCE_DIR}/src/SUIT
36   ${PROJECT_SOURCE_DIR}/src/ViewerData
37   ${PROJECT_SOURCE_DIR}/src/ViewerTools
38   ${PROJECT_SOURCE_DIR}/src/OpenGLUtils
39 )
40
41 # additional preprocessor / compiler flags
42 ADD_DEFINITIONS(${QT_DEFINITIONS} ${OpenCASCADE_DEFINITIONS} ${OGL_DEFINITIONS})
43
44 # libraries to link to
45 SET(_link_LIBRARIES
46   ${OPENGL_LIBRARIES} ${QT_LIBRARIES}
47   ${OpenCASCADE_FoundationClasses_LIBRARIES}
48   ${OpenCASCADE_ModelingData_LIBRARIES}
49   ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
50   ${OpenCASCADE_Visualization_LIBRARIES}
51   CASCatch qtx suit ViewerTools ViewerData OpenGLUtils
52 )
53
54 # --- headers ---
55
56 # header files / to be processed by moc
57 SET(_moc_HEADERS   
58   OCCViewer_AISSelector.h
59   OCCViewer_AxialScaleDlg.h
60   OCCViewer_ClippingDlg.h
61   OCCViewer_RayTracingDlg.h
62   OCCViewer_EnvTextureDlg.h
63   OCCViewer_LightSourceDlg.h
64   OCCViewer_CreateRestoreViewDlg.h
65   OCCViewer_CubeAxesDlg.h
66   OCCViewer_FontWidget.h
67   OCCViewer_SetRotationPointDlg.h
68   OCCViewer_ToolTip.h
69   OCCViewer_ViewFrame.h
70   OCCViewer_ViewManager.h
71   OCCViewer_ViewModel.h
72   OCCViewer_ViewPort.h
73   OCCViewer_ViewPort3d.h
74   OCCViewer_ViewSketcher.h
75   OCCViewer_ViewWindow.h
76   OCCViewer_ViewportInputFilter.h
77   OCCViewer_ClipPlaneInteractor.h
78 )
79
80 # header files / no moc processing
81 SET(_other_HEADERS
82   OCCViewer.h
83   OCCViewer_ClipPlane.h
84   OCCViewer_VService.h
85   OCCViewer_Utilities.h
86 )
87
88 # header files / no moc processing / internal
89 # no processing currently: TODO: check for MSVS project
90 SET(_internal_HEADERS
91   OCCViewer_VService.h
92 )
93
94 # header files / to install
95 SET(OCCViewer_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
96
97 # --- resources ---
98
99 # resource files / to be processed by rcc
100 SET(_rcc_RESOURCES OCCViewer.qrc)
101
102 # resource files / to be processed by lrelease
103 SET(_ts_RESOURCES
104   resources/OCCViewer_images.ts
105   resources/OCCViewer_msg_en.ts
106   resources/OCCViewer_msg_fr.ts
107   resources/OCCViewer_msg_ja.ts
108 )
109
110 # resource files / static
111 SET(_other_RESOURCES
112   resources/occ_view_ambient.png
113   resources/occ_view_anticlockwise.png
114   resources/occ_view_back.png
115   resources/occ_view_bottom.png
116   resources/occ_view_camera_dump.png
117   resources/occ_view_clipping.png
118   resources/occ_view_clipping_pressed.png
119   resources/occ_view_clockwise.png
120   resources/occ_view_clone.png
121   resources/occ_view_fitall.png
122   resources/occ_view_fitarea.png
123   resources/occ_view_fitselection.png
124   resources/occ_view_front.png
125   resources/occ_view_glpan.png
126   resources/occ_view_graduated_axes.png
127   resources/occ_view_left.png
128   resources/occ_view_maximized.png
129   resources/occ_view_minimized.png
130   resources/occ_view_orthographic.png
131   resources/occ_view_pan.png
132   resources/occ_view_perspective.png
133   resources/occ_view_preselection.png
134   resources/occ_view_presets.png
135   resources/occ_view_reset.png
136   resources/occ_view_return_3d_view.png
137   resources/occ_view_right.png
138   resources/occ_view_rotate.png
139   resources/occ_view_rotation_point.png
140   resources/occ_view_scaling.png
141   resources/occ_view_selection.png
142   resources/occ_view_shoot.png
143   resources/occ_view_stereo.png
144   resources/occ_view_style_switch.png
145   resources/occ_view_top.png
146   resources/occ_view_triedre.png
147   resources/occ_view_viewcube.png
148   resources/occ_view_zoom.png
149   resources/occ_view_zooming_style_switch.png
150   resources/occ_view_ray_tracing.png
151   resources/occ_view_env_texture.png
152   resources/occ_view_light_source.png
153   resources/occ_view_circle_style.png
154   resources/occ_view_polygon_style.png
155   resources/occ_view_rect_style.png
156 )
157
158 # --- sources ---
159
160 # sources / moc wrappings
161 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
162
163 # sources / rcc wrappings
164 QT_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES})
165
166 # sources / static
167 SET(_other_SOURCES
168   OCCViewer.cxx
169   OCCViewer_AISSelector.cxx
170   OCCViewer_AxialScaleDlg.cxx
171   OCCViewer_ClippingDlg.cxx
172   OCCViewer_RayTracingDlg.cxx
173   OCCViewer_EnvTextureDlg.cxx
174   OCCViewer_LightSourceDlg.cxx
175   OCCViewer_ClipPlane.cxx
176   OCCViewer_CreateRestoreViewDlg.cxx
177   OCCViewer_CubeAxesDlg.cxx
178   OCCViewer_FontWidget.cxx
179   OCCViewer_SetRotationPointDlg.cxx
180   OCCViewer_ToolTip.cxx
181   OCCViewer_VService.cxx
182   OCCViewer_ViewFrame.cxx
183   OCCViewer_ViewManager.cxx
184   OCCViewer_ViewModel.cxx
185   OCCViewer_ViewPort.cxx
186   OCCViewer_ViewPort3d.cxx
187   OCCViewer_ViewSketcher.cxx
188   OCCViewer_ViewWindow.cxx
189   OCCViewer_ViewportInputFilter.cxx
190   OCCViewer_ClipPlaneInteractor.cxx
191   OCCViewer_Utilities.cxx
192 )
193
194 # sources / to compile
195 SET(OCCViewer_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_rcc_SOURCES})
196
197 # --- rules ---
198
199 ADD_LIBRARY(OCCViewer ${OCCViewer_SOURCES})
200 TARGET_LINK_LIBRARIES(OCCViewer ${_link_LIBRARIES})
201 INSTALL(TARGETS OCCViewer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
202
203 INSTALL(FILES ${OCCViewer_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})