Salome HOME
updated copyright message
[modules/gui.git] / src / GLViewer / CMakeLists.txt
1 # Copyright (C) 2012-2023  CEA, EDF, 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 INCLUDE_DIRECTORIES(
25   ${OpenCASCADE_INCLUDE_DIR}
26   ${QT_INCLUDES}
27   ${PROJECT_SOURCE_DIR}/src/Qtx
28   ${PROJECT_SOURCE_DIR}/src/SUIT
29 )
30
31 # additional preprocessor / compiler flags
32 ADD_DEFINITIONS(${OpenCASCADE_DEFINITIONS} ${QT_DEFINITIONS})
33
34 # libraries to link to
35 SET(_link_LIBRARIES ${QT_LIBRARIES} ${OpenCASCADE_FoundationClasses_LIBRARIES} ${OPENGL_LIBRARIES} qtx suit)
36 IF(NOT (WIN32 OR APPLE))
37   LIST(APPEND _link_LIBRARIES Xmu)
38 ENDIF()
39
40 # --- headers ---
41
42 # header files / to be processed by moc
43 SET(_moc_HEADERS
44   GLViewer_Selector.h
45   GLViewer_Selector2d.h
46   GLViewer_ToolTip.h
47   GLViewer_ViewFrame.h
48   GLViewer_ViewManager.h
49   GLViewer_ViewPort.h
50   GLViewer_ViewPort2d.h
51   GLViewer_Viewer.h
52   GLViewer_Viewer2d.h
53   GLViewer_Widget.h
54 )
55
56 # header files / no moc processing
57 SET(_other_HEADERS
58   GLViewer.h
59   GLViewer_AspectLine.h
60   GLViewer_BaseDrawers.h
61   GLViewer_BaseObjects.h
62   GLViewer_Compass.h
63   GLViewer_Context.h
64   GLViewer_CoordSystem.h
65   GLViewer_Defs.h
66   GLViewer_Drawer.h
67   GLViewer_Geom.h
68   GLViewer_Grid.h
69   GLViewer_Group.h
70   GLViewer_MimeData.h
71   GLViewer_Object.h
72   GLViewer_Text.h
73   GLViewer_Tools.h
74 )
75
76 # header files / to install
77 SET(GLViewer_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
78
79 # --- resources ---
80
81 # resource files / to be processed by lrelease
82 SET(_ts_RESOURCES
83   resources/GLViewer_images.ts
84   resources/GLViewer_msg_en.ts
85   resources/GLViewer_msg_fr.ts
86   resources/GLViewer_msg_ja.ts
87 )
88
89 # resource files / static
90 SET(_other_RESOURCES
91   resources/gl_cursor_rotate.png
92   resources/gl_cursor_sketch.png
93   resources/gl_cursor_zoom.png
94   resources/gl_view_dump.png
95   resources/gl_view_fitall.png
96   resources/gl_view_fitarea.png
97   resources/gl_view_fitselect.png
98   resources/gl_view_glpan.png
99   resources/gl_view_pan.png
100   resources/gl_view_reset.png
101   resources/gl_view_zoom.png
102 )
103
104 # --- sources ---
105
106 # sources / moc wrappings
107 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
108
109 # sources / static
110 SET(_other_SOURCES
111   GLViewer_AspectLine.cxx
112   GLViewer_BaseDrawers.cxx
113   GLViewer_BaseObjects.cxx
114   GLViewer_Compass.cxx
115   GLViewer_Context.cxx
116   GLViewer_CoordSystem.cxx
117   GLViewer_Drawer.cxx
118   GLViewer_Geom.cxx
119   GLViewer_Grid.cxx
120   GLViewer_Group.cxx
121   GLViewer_MimeData.cxx
122   GLViewer_Object.cxx
123   GLViewer_Selector.cxx
124   GLViewer_Selector2d.cxx
125   GLViewer_Text.cxx
126   GLViewer_ToolTip.cxx
127   GLViewer_Tools.cxx
128   GLViewer_ViewFrame.cxx
129   GLViewer_ViewManager.cxx
130   GLViewer_ViewPort.cxx
131   GLViewer_ViewPort2d.cxx
132   GLViewer_Viewer.cxx
133   GLViewer_Viewer2d.cxx
134   GLViewer_Widget.cxx
135 )
136
137 # sources / to compile
138 SET(GLViewer_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
139
140 # --- rules ---
141
142 ADD_LIBRARY(GLViewer ${GLViewer_SOURCES})
143 TARGET_LINK_LIBRARIES(GLViewer ${_link_LIBRARIES})
144 INSTALL(TARGETS GLViewer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
145
146 INSTALL(FILES ${GLViewer_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
147
148 QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}")
149 INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})