Salome HOME
Task 2.1. Creation of ellipses and arcs of ellipse.
[modules/shaper.git] / src / GeomAPI / CMakeLists.txt
1 ## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 FIND_PACKAGE(SWIG REQUIRED)
4
5 INCLUDE(${SWIG_USE_FILE})
6 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
7
8 SET(PROJECT_HEADERS
9     GeomAPI.h
10     GeomAPI_Circ.h
11     GeomAPI_Circ2d.h
12     GeomAPI_Interface.h
13     GeomAPI_XY.h
14     GeomAPI_XYZ.h
15     GeomAPI_Pnt.h
16     GeomAPI_Pnt2d.h
17     GeomAPI_Lin.h
18     GeomAPI_Lin2d.h
19     GeomAPI_Dir.h
20     GeomAPI_Dir2d.h
21     GeomAPI_Pln.h
22     GeomAPI_Shape.h
23     GeomAPI_ShapeExplorer.h
24     GeomAPI_ShapeIterator.h
25     GeomAPI_Edge.h
26     GeomAPI_Face.h
27     GeomAPI_PlanarEdges.h
28     GeomAPI_AISObject.h
29     GeomAPI_IPresentable.h
30     GeomAPI_Curve.h
31     GeomAPI_DataMapOfShapeMapOfShapes.h
32     GeomAPI_DataMapOfShapeShape.h
33     GeomAPI_ICustomPrs.h
34     GeomAPI_Vertex.h
35     GeomAPI_Ax1.h
36     GeomAPI_Ax2.h
37     GeomAPI_Ax3.h
38     GeomAPI_Trsf.h
39     GeomAPI_Angle2d.h
40     GeomAPI_Wire.h
41     GeomAPI_Ellipse.h
42     GeomAPI_Ellipse2d.h
43 )
44
45 SET(PROJECT_SOURCES
46     GeomAPI_Circ.cpp
47     GeomAPI_Circ2d.cpp
48     GeomAPI_Interface.cpp
49     GeomAPI_XY.cpp
50     GeomAPI_XYZ.cpp
51     GeomAPI_Pnt.cpp
52     GeomAPI_Pnt2d.cpp
53     GeomAPI_Lin.cpp
54     GeomAPI_Lin2d.cpp
55     GeomAPI_Dir.cpp
56     GeomAPI_Dir2d.cpp
57     GeomAPI_Pln.cpp
58     GeomAPI_Shape.cpp
59     GeomAPI_ShapeExplorer.cpp
60     GeomAPI_ShapeIterator.cpp
61     GeomAPI_Edge.cpp
62     GeomAPI_Face.cpp
63     GeomAPI_PlanarEdges.cpp
64     GeomAPI_AISObject.cpp
65     GeomAPI_Curve.cpp
66     GeomAPI_DataMapOfShapeMapOfShapes.cpp
67     GeomAPI_DataMapOfShapeShape.cpp
68     GeomAPI_Vertex.cpp
69     GeomAPI_ICustomPrs.cpp
70     GeomAPI_Ax1.cpp
71     GeomAPI_Ax2.cpp
72     GeomAPI_Ax3.cpp
73     GeomAPI_IPresentable.cpp
74     GeomAPI_Trsf.cpp
75     GeomAPI_Angle2d.cpp
76     GeomAPI_Wire.cpp
77     GeomAPI_Ellipse.cpp
78     GeomAPI_Ellipse2d.cpp
79 )
80
81 SET(PROJECT_LIBRARIES
82     ${CAS_KERNEL}
83     ${CAS_MODELER}
84     ${CAS_VIEWER}
85     ${CAS_SHAPE}
86     ${CAS_TKTopAlgo}
87     ${CAS_TKBO}
88 )
89
90 ADD_DEFINITIONS(-DGEOMAPI_EXPORTS ${CAS_DEFINITIONS})
91 ADD_LIBRARY(GeomAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
92
93 SET(CMAKE_SWIG_FLAGS -threads -Wall)
94
95 SET_SOURCE_FILES_PROPERTIES(GeomAPI.i PROPERTIES CPLUSPLUS ON)
96 SET_SOURCE_FILES_PROPERTIES(GeomAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
97
98 INCLUDE_DIRECTORIES(
99   ${CAS_INCLUDE_DIRS}
100 )
101
102 TARGET_LINK_LIBRARIES(GeomAPI ${PROJECT_LIBRARIES})
103
104 SET(SWIG_SCRIPTS
105   ${CMAKE_CURRENT_BINARY_DIR}/GeomAPI.py
106 )
107
108 SET(SWIG_LINK_LIBRARIES
109   GeomAPI
110   ${PYTHON_LIBRARIES}
111 )
112
113 SWIG_ADD_MODULE(GeomAPI python GeomAPI.i ${PROJECT_HEADERS})
114 SWIG_LINK_LIBRARIES(GeomAPI ${SWIG_LINK_LIBRARIES})
115
116 IF(WIN32)
117   SET_TARGET_PROPERTIES(_GeomAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomAPI_d)
118 ENDIF(WIN32)
119
120 INSTALL(TARGETS _GeomAPI DESTINATION ${SHAPER_INSTALL_SWIG})
121 INSTALL(TARGETS GeomAPI DESTINATION ${SHAPER_INSTALL_BIN})
122 INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})