Salome HOME
Merge from V6_main 28/02/2013
[modules/gui.git] / src / SVTK / 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   ${QT_INCLUDES}
25   ${VTK_INCLUDE_DIRS}
26   ${PTHREAD_INCLUDE_DIRS}
27   ${BOOST_INCLUDE_DIRS}
28   ${KERNEL_ROOT_DIR}/include/salome
29   ${CMAKE_BINARY_DIR}
30   ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx
31   ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT
32   ${CMAKE_CURRENT_SOURCE_DIR}/../ViewerTools
33   ${CMAKE_CURRENT_SOURCE_DIR}/../OBJECT
34   ${CMAKE_CURRENT_SOURCE_DIR}/../Prs
35   ${CMAKE_CURRENT_SOURCE_DIR}/../VTKViewer
36   ${CMAKE_CURRENT_SOURCE_DIR}/../OpenGLUtils
37 )
38
39 ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${VTK_DEFINITIONS} ${BOOST_DEFINITIONS})
40
41 SET(COMMON_LIBS
42   qtx
43   suit
44   ViewerTools
45   SalomeObject
46   SalomePrs
47   VTKViewer
48   OpenGLUtils
49   ${KERNEL_SALOMELocalTrace}
50   ${KERNEL_OpUtil}
51   ${VTK_LIBRARIES}
52   ${OPENGL_LIBRARIES}
53   ${QT_LIBRARIES}
54   ${CAS_KERNEL}
55   ${CAS_VIEWER}
56 )
57
58 SET(GUI_HEADERS SVTK_GenericRenderWindowInteractor.h SVTK_RenderWindowInteractor.h SVTK_NonIsometricDlg.h 
59   SVTK_UpdateRateDlg.h SVTK_CubeAxesDlg.h SVTK_FontWidget.h SVTK_ViewModelBase.h SVTK_ViewManager.h 
60   SVTK_ViewWindow.h SVTK_ViewModel.h SVTK_View.h SVTK_SetRotationPointDlg.h SVTK_ViewParameterDlg.h
61   SVTK_ComboAction.h SVTK_RecorderDlg.h)
62 QT4_WRAP_CPP(GUI_HEADERS ${GUI_HEADERS})
63
64 SET(SVTK_SOURCES
65   SVTK_Prs.cxx
66   SVTK_Actor.cxx
67   SALOME_Actor.cxx
68   SVTK_RectPicker.cxx
69   SVTK_DeviceActor.cxx
70   SVTK_CubeAxesActor2D.cxx
71   SVTK_NonIsometricDlg.cxx
72   SVTK_UpdateRateDlg.cxx
73   SVTK_CubeAxesDlg.cxx
74   SVTK_FontWidget.cxx
75   SVTK_Trihedron.cxx
76   SVTK_View.cxx
77   SVTK_ViewManager.cxx
78   SVTK_ViewModel.cxx
79   SVTK_Renderer.cxx
80   SVTK_ViewWindow.cxx
81   SVTK_InteractorStyle.cxx
82   SVTK_KeyFreeInteractorStyle.cxx
83   SVTK_RenderWindowInteractor.cxx
84   SVTK_GenericRenderWindowInteractor.cxx
85   SVTK_SpaceMouse.cxx
86   SVTK_Selector.cxx
87   SVTK_SetRotationPointDlg.cxx
88   SVTK_ViewParameterDlg.cxx
89   SVTK_ComboAction.cxx
90   SVTK_Recorder.cxx
91   SVTK_RecorderDlg.cxx
92   SVTK_ImageWriter.cxx
93   SVTK_ImageWriterMgr.cxx
94   SVTK_Utils.cxx
95   vtkPVAxesActor.h
96   vtkPVAxesActor.cxx
97   vtkPVAxesWidget.h
98   vtkPVAxesWidget.cxx
99 )
100
101 SET(GUITS_SOURCES
102   resources/SVTK_msg_en.ts
103   resources/SVTK_msg_fr.ts
104   resources/SVTK_images.ts
105 )
106
107 ADD_LIBRARY(SVTK ${SVTK_SOURCES} ${GUI_HEADERS})
108 TARGET_LINK_LIBRARIES(SVTK ${COMMON_LIBS})
109 INSTALL(TARGETS SVTK DESTINATION ${GUI_salomelib_LIBS})
110
111 #ADD_EXECUTABLE(TestSVTK SVTK.cxx)
112 #SET_TARGET_PROPERTIES(TestSVTK PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}" OUTPUT_NAME "SVTK")
113 #TARGET_LINK_LIBRARIES(TestSVTK SVTK ${COMMON_LIBS})
114 #INSTALL(TARGETS TestSVTK DESTINATION ${GUI_salomebin_BINS})
115
116 SET(COMMON_HEADERS_H 
117   SVTK.h
118   SVTK_Prs.h
119   SVTK_Actor.h
120   SALOME_Actor.h
121   SVTK_RectPicker.h
122   SVTK_DeviceActor.h
123   SVTK_FontWidget.h
124   SVTK_CubeAxesActor2D.h
125   SVTK_Functor.h
126   SVTK_View.h
127   SVTK_ViewManager.h
128   SVTK_ViewModel.h
129   SVTK_ViewWindow.h
130   SVTK_Renderer.h
131   SVTK_InteractorStyle.h
132   SVTK_KeyFreeInteractorStyle.h
133   SVTK_RenderWindowInteractor.h
134   SVTK_GenericRenderWindowInteractor.h
135   SVTK_Selector.h
136   SVTK_Selection.h
137   SVTK_SelectionEvent.h
138   SVTK_SpaceMouse.h
139   SVTK_Event.h
140   SVTK_ViewModelBase.h
141   SVTK_SetRotationPointDlg.h
142   SVTK_ViewParameterDlg.h
143   SVTK_ComboAction.h
144   SVTK_Recorder.h
145   SVTK_RecorderDlg.h
146   SVTK_ImageWriter.h
147   SVTK_ImageWriterMgr.h
148   SVTK_Utils.h
149 )
150 INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS})
151 QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}")
152
153 FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png")
154 INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA})
155