Salome HOME
CMake: new CMake procedure for GUI.
[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 INCLUDE_DIRECTORIES(
26   ${CAS_INCLUDE_DIRS}
27   ${OGL_INCLUDE_DIRS}
28   ${QT_INCLUDES}
29   ${PTHREAD_INCLUDE_DIRS}
30   ${KERNEL_INCLUDE_DIRS}
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
38
39
40 SET(COMMON_LIBS
41   qtx
42   suit
43   ViewerTools
44   OpenGLUtils
45   ${OPENGL_LIBRARIES}
46   ${QT_LIBRARIES}
47   ${CAS_KERNEL}
48   ${CAS_VIEWER}
49 )
50
51 SET(GUI_HEADERS 
52   OCCViewer_AISSelector.h
53   OCCViewer_ViewModel.h
54   OCCViewer_ViewPort3d.h
55   OCCViewer_ViewPort.h
56   OCCViewer_ViewSketcher.h
57   OCCViewer_ViewWindow.h
58   OCCViewer_ViewManager.h
59   OCCViewer_CreateRestoreViewDlg.h
60   OCCViewer_SetRotationPointDlg.h
61   OCCViewer_ClippingDlg.h
62   OCCViewer_AxialScaleDlg.h
63   OCCViewer_FontWidget.h
64   OCCViewer_CubeAxesDlg.h
65   OCCViewer_ToolTip.h
66   OCCViewer_ViewFrame.h
67 )
68 QT4_WRAP_CPP(GUI_HEADERS ${GUI_HEADERS})
69
70 SET(OCCViewer_SOURCES
71   OCCViewer_AISSelector.cxx
72   OCCViewer_ViewManager.cxx
73   OCCViewer_ViewModel.cxx
74   OCCViewer_ViewPort3d.cxx
75   OCCViewer_ViewPort.cxx
76   OCCViewer_ViewSketcher.cxx
77   OCCViewer_ViewWindow.cxx
78   OCCViewer_VService.cxx
79   OCCViewer_CreateRestoreViewDlg.cxx
80   OCCViewer_SetRotationPointDlg.cxx
81   OCCViewer_ClippingDlg.cxx
82   OCCViewer_AxialScaleDlg.cxx
83   OCCViewer_Trihedron.cxx
84   OCCViewer_FontWidget.cxx
85   OCCViewer_CubeAxesDlg.cxx
86   OCCViewer_ToolTip.cxx
87   OCCViewer_ViewFrame.cxx
88 )
89
90 SET(GUITS_SOURCES
91   resources/OCCViewer_images.ts
92   resources/OCCViewer_msg_en.ts
93   resources/OCCViewer_msg_fr.ts
94 )
95
96 ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${OGL_DEFINITIONS})
97
98 ADD_LIBRARY(OCCViewer ${OCCViewer_SOURCES} ${GUI_HEADERS})
99 TARGET_LINK_LIBRARIES(OCCViewer ${COMMON_LIBS})
100 INSTALL(TARGETS OCCViewer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
101 SET(COMMON_HEADERS_H
102   OCCViewer_AISSelector.h
103   OCCViewer_ViewManager.h
104   OCCViewer_ViewModel.h
105   OCCViewer_ViewPort3d.h
106   OCCViewer_ViewPort.h
107   OCCViewer_ViewSketcher.h
108   OCCViewer_ViewWindow.h
109   OCCViewer_VService.h
110   OCCViewer_CreateRestoreViewDlg.h
111   OCCViewer.h
112   OCCViewer_ClippingDlg.h       
113   OCCViewer_AxialScaleDlg.h
114   OCCViewer_SetRotationPointDlg.h
115   OCCViewer_Trihedron.h 
116   OCCViewer_FontWidget.h
117   OCCViewer_CubeAxesDlg.h
118   OCCViewer_ToolTip.h
119   OCCViewer_ViewFrame.h
120 )
121 INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS})
122 QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}")
123
124 FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png")
125 INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})