Salome HOME
04f406477635cc4cd459f2099103e02066bd0bea
[modules/gui.git] / src / OCCViewer / CMakeLists.txt
1 # Copyright (C) 2007-2012  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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake)
24
25 INCLUDE_DIRECTORIES(
26   ${CAS_INCLUDE_DIRS}
27   ${OGL_INCLUDE_DIRS}
28   ${QT_INCLUDE_DIRS}
29   ${PTHREAD_INCLUDE_DIRS}
30   ${KERNEL_ROOT_DIR}/include/salome
31   ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT
32   ${CMAKE_CURRENT_SOURCE_DIR}/../ViewerTools
33   ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx
34   ${CMAKE_CURRENT_SOURCE_DIR}/../OpenGLUtils
35   ${CMAKE_CURRENT_SOURCE_DIR}/../CASCatch
36 )
37 SET(COMMON_FLAGS "${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${OGL_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
38 SET(COMMON_LIBS
39   qtx
40   suit
41   ViewerTools
42   OpenGLUtils
43   ${OGL_LIBS}
44   ${QT_MT_LIBS}
45   ${CAS_KERNEL}
46   ${CAS_VIEWER}
47 )
48
49 SET(GUI_HEADERS 
50   OCCViewer_AISSelector.h
51   OCCViewer_ViewModel.h
52   OCCViewer_ViewPort3d.h
53   OCCViewer_ViewPort.h
54   OCCViewer_ViewSketcher.h
55   OCCViewer_ViewWindow.h
56   OCCViewer_ViewManager.h
57   OCCViewer_CreateRestoreViewDlg.h
58   OCCViewer_SetRotationPointDlg.h
59   OCCViewer_ClippingDlg.h
60   OCCViewer_AxialScaleDlg.h
61   OCCViewer_FontWidget.h
62   OCCViewer_CubeAxesDlg.h
63   OCCViewer_ToolTip.h
64   OCCViewer_ViewFrame.h
65 )
66 QT4_WRAP_CPP(GUI_HEADERS ${GUI_HEADERS})
67
68 SET(OCCViewer_SOURCES
69   OCCViewer_AISSelector.cxx
70   OCCViewer_ViewManager.cxx
71   OCCViewer_ViewModel.cxx
72   OCCViewer_ViewPort3d.cxx
73   OCCViewer_ViewPort.cxx
74   OCCViewer_ViewSketcher.cxx
75   OCCViewer_ViewWindow.cxx
76   OCCViewer_VService.cxx
77   OCCViewer_CreateRestoreViewDlg.cxx
78   OCCViewer_SetRotationPointDlg.cxx
79   OCCViewer_ClippingDlg.cxx
80   OCCViewer_AxialScaleDlg.cxx
81   OCCViewer_Trihedron.cxx
82   OCCViewer_FontWidget.cxx
83   OCCViewer_CubeAxesDlg.cxx
84   OCCViewer_ToolTip.cxx
85   OCCViewer_ViewFrame.cxx
86 )
87
88 SET(GUITS_SOURCES
89   resources/OCCViewer_images.ts
90   resources/OCCViewer_msg_en.ts
91   resources/OCCViewer_msg_fr.ts
92 )
93
94 ADD_LIBRARY(OCCViewer SHARED ${OCCViewer_SOURCES} ${GUI_HEADERS})
95 SET_TARGET_PROPERTIES(OCCViewer PROPERTIES COMPILE_FLAGS ${COMMON_FLAGS})
96 TARGET_LINK_LIBRARIES(OCCViewer ${COMMON_LIBS})
97 INSTALL(TARGETS OCCViewer DESTINATION ${GUI_salomelib_LIBS})
98 SET(COMMON_HEADERS_H
99   OCCViewer_AISSelector.h
100   OCCViewer_ViewManager.h
101   OCCViewer_ViewModel.h
102   OCCViewer_ViewPort3d.h
103   OCCViewer_ViewPort.h
104   OCCViewer_ViewSketcher.h
105   OCCViewer_ViewWindow.h
106   OCCViewer_VService.h
107   OCCViewer_CreateRestoreViewDlg.h
108   OCCViewer.h
109   OCCViewer_ClippingDlg.h       
110   OCCViewer_AxialScaleDlg.h
111   OCCViewer_SetRotationPointDlg.h
112   OCCViewer_Trihedron.h 
113   OCCViewer_FontWidget.h
114   OCCViewer_CubeAxesDlg.h
115   OCCViewer_ToolTip.h
116   OCCViewer_ViewFrame.h
117 )
118 INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS})
119 QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}")
120
121 FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png")
122 INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA})