Salome HOME
CMake porting
[modules/geom.git] / src / OBJECT / 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(${QT_USE_FILE})
21 INCLUDE(${VTK_USE_FILE})
22
23 # --- options ---
24
25 # additional include directories
26 INCLUDE_DIRECTORIES(
27   ${VTK_INCLUDE_DIRS}
28   ${QT_INCLUDE_DIRS}
29   ${OMNIORB_INCLUDE_DIR}
30   ${CAS_INCLUDE_DIRS}
31   ${KERNEL_INCLUDE_DIRS}
32   ${GUI_INCLUDE_DIRS}
33   ${PROJECT_BINARY_DIR}/idl
34   ${PROJECT_BINARY_DIR}
35   ${PROJECT_SOURCE_DIR}/src/OCC2VTK
36   ${CMAKE_CURRENT_SOURCE_DIR}
37   )
38
39 # additional preprocessor / compiler flags
40 ADD_DEFINITIONS(
41   ${CAS_DEFINITIONS}
42   ${OMNIORB_DEFINITIONS}
43   ${QT_DEFINITIONS}
44   )
45
46 # libraries to link to
47 SET(_link_LIBRARIES
48   OCC2VTK
49   SalomeIDLGEOM
50   ${CAS_TKBRep}
51   ${KERNEL_SALOMELocalTrace}
52   ${GUI_SalomeObject}
53   ${GUI_SVTK}
54   ${QT_QTCORE_LIBRARY}
55   vtkRenderingMatplotlib
56   vtkInteractionStyle
57   #${VTK_LIBRARIES}
58   )
59
60 # --- headers ---
61
62 SET(OBJECT_HEADERS
63   GEOM_Actor.h
64   GEOM_AISShape.hxx
65   GEOM_AISShape.ixx
66   GEOM_AISShape.jxx
67   Handle_GEOM_AISShape.hxx
68   GEOM_TopWireframeShape.hxx
69   GEOM_TopWireframeShape.ixx
70   GEOM_TopWireframeShape.jxx
71   Handle_GEOM_TopWireframeShape.hxx
72   GEOM_InteractiveObject.hxx
73   GEOM_InteractiveObject.ixx
74   GEOM_InteractiveObject.jxx
75   Handle_GEOM_InteractiveObject.hxx
76   GEOM_AISTrihedron.hxx
77   GEOM_VTKTrihedron.hxx
78   GEOM_VTKPropertyMaterial.hxx
79   GEOM_AISVector.hxx
80   GEOM_OBJECT_defs.hxx
81   GEOM_OCCReader.h
82   GEOM_SmartPtr.h
83   GEOM_PainterPolyDataMapper.h
84   GEOM_DeviceActor.h
85   GEOM_Constants.h
86   )
87 # --- sources ---
88
89 SET(OBJECT_SOURCES
90   GEOM_Actor.cxx
91   GEOM_OCCReader.cxx
92   GEOM_AISShape.cxx
93   GEOM_TopWireframeShape.cxx
94   GEOM_InteractiveObject.cxx
95   GEOM_AISTrihedron.cxx
96   GEOM_VTKTrihedron.cxx
97   GEOM_VTKPropertyMaterial.cxx
98   GEOM_AISVector.cxx
99   GEOM_PainterPolyDataMapper.cxx
100   GEOM_DeviceActor.cxx
101   GEOM_Constants.cxx
102   )
103
104 # --- rules ---
105
106 ADD_LIBRARY(GEOMObject ${OBJECT_SOURCES})
107 TARGET_LINK_LIBRARIES(GEOMObject ${_link_LIBRARIES})
108 INSTALL(TARGETS GEOMObject EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
109
110 INSTALL(FILES ${OBJECT_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})