Salome HOME
0a43ad808bc19a8f7917c5e838d2c0eec2596c6d
[modules/gui.git] / src / GLViewer / CMakeLists.txt
1 # Copyright (C) 2012-2013  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.
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(UseQt4Ext)
21
22 INCLUDE_DIRECTORIES(
23   ${CAS_INCLUDE_DIRS}
24   ${PTHREAD_INCLUDE_DIRS}
25   ${QT_INCLUDES}
26   ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx
27   ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT
28 )
29
30 SET(COMMON_LIBS
31   suit 
32   ${QT_LIBRARIES} 
33   ${CAS_KERNEL} 
34   ${OPENGL_LIBRARIES}
35 )
36
37 SET(GUI_HEADERS GLViewer_Selector.h GLViewer_Selector2d.h GLViewer_ToolTip.h GLViewer_ViewFrame.h GLViewer_ViewManager.h GLViewer_ViewPort.h GLViewer_ViewPort2d.h GLViewer_Viewer.h GLViewer_Viewer2d.h GLViewer_Widget.h)
38 QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS})
39
40 SET(GLViewer_SOURCES
41   GLViewer_AspectLine.cxx
42   GLViewer_BaseDrawers.cxx
43   GLViewer_BaseObjects.cxx
44   GLViewer_Compass.cxx
45   GLViewer_Context.cxx
46   GLViewer_CoordSystem.cxx
47   GLViewer_Drawer.cxx
48   GLViewer_Geom.cxx
49   GLViewer_Grid.cxx
50   GLViewer_Group.cxx
51   GLViewer_MimeData.cxx
52   GLViewer_Object.cxx
53   GLViewer_Selector.cxx
54   GLViewer_Selector2d.cxx
55   GLViewer_Text.cxx
56   GLViewer_Tools.cxx
57   GLViewer_ToolTip.cxx
58   GLViewer_ViewFrame.cxx
59   GLViewer_ViewManager.cxx
60   GLViewer_ViewPort.cxx
61   GLViewer_ViewPort2d.cxx
62   GLViewer_Viewer.cxx
63   GLViewer_Viewer2d.cxx
64   GLViewer_Widget.cxx
65 )
66
67 SET(GUITS_SOURCES
68   resources/GLViewer_images.ts
69   resources/GLViewer_msg_en.ts
70   resources/GLViewer_msg_fr.ts
71 )
72
73 ADD_DEFINITIONS(${CAS_DEFINITIONS})
74
75 ADD_LIBRARY(GLViewer ${GLViewer_SOURCES} ${GUI_HEADERS_MOC})
76 TARGET_LINK_LIBRARIES(GLViewer ${COMMON_LIBS})
77 INSTALL(TARGETS GLViewer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
78
79 FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
80 INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS})
81 QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}")
82
83 FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png")
84 INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})