Salome HOME
Update constraint Angle to store directions of the lines
[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_Edge.h
25     GeomAPI_Face.h
26     GeomAPI_PlanarEdges.h
27     GeomAPI_AISObject.h
28     GeomAPI_IPresentable.h
29     GeomAPI_Curve.h
30     GeomAPI_DataMapOfShapeMapOfShapes.h
31     GeomAPI_DataMapOfShapeShape.h
32     GeomAPI_ICustomPrs.h
33     GeomAPI_Vertex.h
34     GeomAPI_Ax1.h
35     GeomAPI_Ax2.h
36     GeomAPI_Ax3.h
37     GeomAPI_Trsf.h
38     GeomAPI_Angle.h
39     GeomAPI_Angle2d.h
40 )
41
42 SET(PROJECT_SOURCES
43     GeomAPI_Circ.cpp
44     GeomAPI_Circ2d.cpp
45     GeomAPI_Interface.cpp
46     GeomAPI_XY.cpp
47     GeomAPI_XYZ.cpp
48     GeomAPI_Pnt.cpp
49     GeomAPI_Pnt2d.cpp
50     GeomAPI_Lin.cpp
51     GeomAPI_Lin2d.cpp
52     GeomAPI_Dir.cpp
53     GeomAPI_Dir2d.cpp
54     GeomAPI_Pln.cpp
55     GeomAPI_Shape.cpp
56     GeomAPI_ShapeExplorer.cpp
57     GeomAPI_Edge.cpp
58     GeomAPI_Face.cpp
59     GeomAPI_PlanarEdges.cpp
60     GeomAPI_AISObject.cpp
61     GeomAPI_Curve.cpp
62     GeomAPI_DataMapOfShapeMapOfShapes.cpp
63     GeomAPI_DataMapOfShapeShape.cpp
64     GeomAPI_Vertex.cpp
65     GeomAPI_ICustomPrs.cpp
66     GeomAPI_Ax1.cpp
67     GeomAPI_Ax2.cpp
68     GeomAPI_Ax3.cpp
69     GeomAPI_IPresentable.cpp
70     GeomAPI_Trsf.cpp
71     GeomAPI_Angle.cpp
72     GeomAPI_Angle2d.cpp
73 )
74
75 SET(PROJECT_LIBRARIES
76     ${CAS_KERNEL}
77     ${CAS_MODELER}
78     ${CAS_VIEWER}
79     ${CAS_SHAPE}
80     ${CAS_TKTopAlgo}
81 )
82
83 ADD_DEFINITIONS(-DGEOMAPI_EXPORTS ${CAS_DEFINITIONS})
84 ADD_LIBRARY(GeomAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
85
86 SET(CMAKE_SWIG_FLAGS -threads -Wall)
87
88 SET_SOURCE_FILES_PROPERTIES(GeomAPI.i PROPERTIES CPLUSPLUS ON)
89 SET_SOURCE_FILES_PROPERTIES(GeomAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
90
91 INCLUDE_DIRECTORIES(
92   ${CAS_INCLUDE_DIRS}
93 )
94
95 TARGET_LINK_LIBRARIES(GeomAPI ${PROJECT_LIBRARIES})
96
97 SET(SWIG_SCRIPTS
98   ${CMAKE_CURRENT_BINARY_DIR}/GeomAPI.py
99 )
100
101 SET(SWIG_LINK_LIBRARIES
102   GeomAPI
103   ${PYTHON_LIBRARIES}
104 )
105
106 SWIG_ADD_MODULE(GeomAPI python GeomAPI.i ${PROJECT_HEADERS})
107 SWIG_LINK_LIBRARIES(GeomAPI ${SWIG_LINK_LIBRARIES})
108
109 IF(WIN32)
110   SET_TARGET_PROPERTIES(_GeomAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomAPI_d)
111 ENDIF(WIN32)
112
113 INSTALL(TARGETS _GeomAPI DESTINATION ${SHAPER_INSTALL_SWIG})
114 INSTALL(TARGETS GeomAPI DESTINATION ${SHAPER_INSTALL_BIN})
115 INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})