Salome HOME
CMake build procedure improvements
[modules/gui.git] / src / OCCViewer / CMakeLists.txt
1 # Copyright (C) 2007-2013  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.
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(UseQt4Ext)
24
25 # --- options ---
26
27 # additional include directories
28 INCLUDE_DIRECTORIES(
29   ${CAS_INCLUDE_DIRS}
30   ${OGL_INCLUDE_DIRS}
31   ${QT_INCLUDES}
32   ${KERNEL_INCLUDE_DIRS}
33   ${PROJECT_SOURCE_DIR}/src/CASCatch
34   ${PROJECT_SOURCE_DIR}/src/Qtx
35   ${PROJECT_SOURCE_DIR}/src/OpenGLUtils
36   ${PROJECT_SOURCE_DIR}/src/SUIT
37   ${PROJECT_SOURCE_DIR}/src/ViewerTools
38 )
39
40 # additional preprocessor / compiler flags
41 ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${OGL_DEFINITIONS})
42
43 # libraries to link to
44 SET(_link_LIBRARIES
45   ${OPENGL_LIBRARIES} ${QT_LIBRARIES} ${CAS_KERNEL} ${CAS_VIEWER}
46   CASCatch qtx suit OpenGLUtils ViewerTools
47 )
48
49 # --- headers ---
50
51 # header files / to be processed by moc
52 SET(_moc_HEADERS   
53   OCCViewer_AISSelector.h
54   OCCViewer_AxialScaleDlg.h
55   OCCViewer_ClippingDlg.h
56   OCCViewer_CreateRestoreViewDlg.h
57   OCCViewer_CubeAxesDlg.h
58   OCCViewer_FontWidget.h
59   OCCViewer_SetRotationPointDlg.h
60   OCCViewer_ToolTip.h
61   OCCViewer_ViewFrame.h
62   OCCViewer_ViewManager.h
63   OCCViewer_ViewModel.h
64   OCCViewer_ViewPort.h
65   OCCViewer_ViewPort3d.h
66   OCCViewer_ViewSketcher.h
67   OCCViewer_ViewWindow.h
68 )
69
70 # header files / no moc processing
71 SET(_other_HEADERS
72   OCCViewer.h
73   OCCViewer_Trihedron.h 
74   OCCViewer_VService.h
75 )
76
77 # header files / no moc processing / internal
78 # no processing currently: TODO: check for MSVS project
79 SET(_internal_HEADERS
80   OCCViewer_VService.h
81 )
82
83 # header files / to install
84 SET(OCCViewer_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
85
86 # --- resources ---
87
88 # resource files / to be processed by lrelease
89 SET(_ts_RESOURCES
90   resources/OCCViewer_images.ts
91   resources/OCCViewer_msg_en.ts
92   resources/OCCViewer_msg_fr.ts
93   resources/OCCViewer_msg_ja.ts
94 )
95
96 # resource files / static
97 SET(_other_RESOURCES
98   resources/occ_view_ambient.png
99   resources/occ_view_anticlockwise.png
100   resources/occ_view_back.png
101   resources/occ_view_bottom.png
102   resources/occ_view_camera_dump.png
103   resources/occ_view_clipping.png
104   resources/occ_view_clipping_pressed.png
105   resources/occ_view_clockwise.png
106   resources/occ_view_clone.png
107   resources/occ_view_fitall.png
108   resources/occ_view_fitarea.png
109   resources/occ_view_front.png
110   resources/occ_view_glpan.png
111   resources/occ_view_graduated_axes.png
112   resources/occ_view_left.png
113   resources/occ_view_maximized.png
114   resources/occ_view_minimized.png
115   resources/occ_view_pan.png
116   resources/occ_view_preselection.png
117   resources/occ_view_presets.png
118   resources/occ_view_reset.png
119   resources/occ_view_right.png
120   resources/occ_view_rotate.png
121   resources/occ_view_rotation_point.png
122   resources/occ_view_scaling.png
123   resources/occ_view_selection.png
124   resources/occ_view_shoot.png
125   resources/occ_view_style_switch.png
126   resources/occ_view_top.png
127   resources/occ_view_triedre.png
128   resources/occ_view_zoom.png
129   resources/occ_view_zooming_style_switch.png
130 )
131
132 # --- sources ---
133
134 # sources / moc wrappings
135 QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
136
137 # sources / static
138 SET(_other_SOURCES
139   OCCViewer_AISSelector.cxx
140   OCCViewer_AxialScaleDlg.cxx
141   OCCViewer_ClippingDlg.cxx
142   OCCViewer_CreateRestoreViewDlg.cxx
143   OCCViewer_CubeAxesDlg.cxx
144   OCCViewer_FontWidget.cxx
145   OCCViewer_SetRotationPointDlg.cxx
146   OCCViewer_ToolTip.cxx
147   OCCViewer_Trihedron.cxx
148   OCCViewer_VService.cxx
149   OCCViewer_ViewFrame.cxx
150   OCCViewer_ViewManager.cxx
151   OCCViewer_ViewModel.cxx
152   OCCViewer_ViewPort.cxx
153   OCCViewer_ViewPort3d.cxx
154   OCCViewer_ViewSketcher.cxx
155   OCCViewer_ViewWindow.cxx
156 )
157
158 # sources / to compile
159 SET(OCCViewer_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
160
161 # --- rules ---
162
163 ADD_LIBRARY(OCCViewer ${OCCViewer_SOURCES})
164 TARGET_LINK_LIBRARIES(OCCViewer ${_link_LIBRARIES})
165 INSTALL(TARGETS OCCViewer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
166
167 INSTALL(FILES ${OCCViewer_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
168 QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}")
169
170 INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})