Salome HOME
9a455f44af13f7e0b344d0273715d6b246f8713a
[modules/gui.git] / src / GLViewer / CMakeLists.txt
1 # Copyright (C) 2012  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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake)
21
22 INCLUDE_DIRECTORIES(
23   ${CAS_INCLUDE_DIRS}
24   ${PTHREAD_INCLUDE_DIRS}
25   ${QT_INCLUDE_DIRS}
26   ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx
27   ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT
28 )
29
30 SET(COMMON_LIBS
31   suit 
32   ${QT_MT_LIBS} 
33   ${CAS_KERNEL} 
34   ${OGL_LIBS}
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_LIBRARY(GLViewer SHARED ${GLViewer_SOURCES} ${GUI_HEADERS_MOC})
74 SET_TARGET_PROPERTIES(GLViewer PROPERTIES COMPILE_FLAGS "${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
75 TARGET_LINK_LIBRARIES(GLViewer ${COMMON_LIBS})
76 INSTALL(TARGETS GLViewer DESTINATION ${GUI_salomelib_LIBS})
77
78 FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
79 INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS})
80 QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}")
81
82 FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png")
83 INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA})