]> SALOME platform Git repositories - modules/shaper.git/blob - src/GeomAPI/CMakeLists.txt
Salome HOME
Fix for the issue #2401
[modules/shaper.git] / src / GeomAPI / CMakeLists.txt
1 ## Copyright (C) 2014-2017  CEA/DEN, EDF R&D
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, or (at your option) any later version.
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
18 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
19 ##
20
21 FIND_PACKAGE(SWIG REQUIRED)
22
23 INCLUDE(${SWIG_USE_FILE})
24 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
25
26 SET(PROJECT_HEADERS
27     GeomAPI.h
28     GeomAPI_Circ.h
29     GeomAPI_Circ2d.h
30     GeomAPI_Interface.h
31     GeomAPI_XY.h
32     GeomAPI_XYZ.h
33     GeomAPI_Pnt.h
34     GeomAPI_Pnt2d.h
35     GeomAPI_Lin.h
36     GeomAPI_Lin2d.h
37     GeomAPI_Dir.h
38     GeomAPI_Dir2d.h
39     GeomAPI_Pln.h
40     GeomAPI_Shape.h
41     GeomAPI_ShapeExplorer.h
42     GeomAPI_ShapeIterator.h
43     GeomAPI_Edge.h
44     GeomAPI_Face.h
45     GeomAPI_PlanarEdges.h
46     GeomAPI_AISObject.h
47     GeomAPI_IPresentable.h
48     GeomAPI_Curve.h
49     GeomAPI_DataMapOfShapeMapOfShapes.h
50     GeomAPI_DataMapOfShapeShape.h
51     GeomAPI_ICustomPrs.h
52     GeomAPI_Vertex.h
53     GeomAPI_Ax1.h
54     GeomAPI_Ax2.h
55     GeomAPI_Ax3.h
56     GeomAPI_Trsf.h
57     GeomAPI_Angle2d.h
58     GeomAPI_Wire.h
59     GeomAPI_Ellipse.h
60     GeomAPI_Ellipse2d.h
61 )
62
63 SET(PROJECT_SOURCES
64     GeomAPI_Circ.cpp
65     GeomAPI_Circ2d.cpp
66     GeomAPI_Interface.cpp
67     GeomAPI_XY.cpp
68     GeomAPI_XYZ.cpp
69     GeomAPI_Pnt.cpp
70     GeomAPI_Pnt2d.cpp
71     GeomAPI_Lin.cpp
72     GeomAPI_Lin2d.cpp
73     GeomAPI_Dir.cpp
74     GeomAPI_Dir2d.cpp
75     GeomAPI_Pln.cpp
76     GeomAPI_Shape.cpp
77     GeomAPI_ShapeExplorer.cpp
78     GeomAPI_ShapeIterator.cpp
79     GeomAPI_Edge.cpp
80     GeomAPI_Face.cpp
81     GeomAPI_PlanarEdges.cpp
82     GeomAPI_AISObject.cpp
83     GeomAPI_Curve.cpp
84     GeomAPI_DataMapOfShapeMapOfShapes.cpp
85     GeomAPI_DataMapOfShapeShape.cpp
86     GeomAPI_Vertex.cpp
87     GeomAPI_ICustomPrs.cpp
88     GeomAPI_Ax1.cpp
89     GeomAPI_Ax2.cpp
90     GeomAPI_Ax3.cpp
91     GeomAPI_IPresentable.cpp
92     GeomAPI_Trsf.cpp
93     GeomAPI_Angle2d.cpp
94     GeomAPI_Wire.cpp
95     GeomAPI_Ellipse.cpp
96     GeomAPI_Ellipse2d.cpp
97 )
98
99 SET(PROJECT_LIBRARIES
100     ${CAS_KERNEL}
101     ${CAS_MODELER}
102     ${CAS_VIEWER}
103     ${CAS_SHAPE}
104     ${CAS_TKTopAlgo}
105     ${CAS_TKBO}
106 )
107
108 ADD_DEFINITIONS(-DGEOMAPI_EXPORTS ${CAS_DEFINITIONS})
109 ADD_LIBRARY(GeomAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
110
111 SET(CMAKE_SWIG_FLAGS -threads -Wall)
112
113 SET_SOURCE_FILES_PROPERTIES(GeomAPI.i PROPERTIES CPLUSPLUS ON)
114 SET_SOURCE_FILES_PROPERTIES(GeomAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
115
116 INCLUDE_DIRECTORIES(
117   ${CAS_INCLUDE_DIRS}
118 )
119
120 TARGET_LINK_LIBRARIES(GeomAPI ${PROJECT_LIBRARIES})
121
122 SET(SWIG_SCRIPTS
123   ${CMAKE_CURRENT_BINARY_DIR}/GeomAPI.py
124 )
125
126 SET(SWIG_LINK_LIBRARIES
127   GeomAPI
128   ${PYTHON_LIBRARIES}
129 )
130
131 SWIG_ADD_MODULE(GeomAPI python GeomAPI.i ${PROJECT_HEADERS})
132 SWIG_LINK_LIBRARIES(GeomAPI ${SWIG_LINK_LIBRARIES})
133
134 IF(WIN32)
135   SET_TARGET_PROPERTIES(_GeomAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomAPI_d)
136 ENDIF(WIN32)
137
138 INSTALL(TARGETS _GeomAPI DESTINATION ${SHAPER_INSTALL_SWIG})
139 INSTALL(TARGETS GeomAPI DESTINATION ${SHAPER_INSTALL_BIN})
140 INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})