Salome HOME
Improvement #651: Arc direction must be flexible
[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 )
39
40 SET(PROJECT_SOURCES
41     GeomAPI_Circ.cpp
42     GeomAPI_Circ2d.cpp
43     GeomAPI_Interface.cpp
44     GeomAPI_XY.cpp
45     GeomAPI_XYZ.cpp
46     GeomAPI_Pnt.cpp
47     GeomAPI_Pnt2d.cpp
48     GeomAPI_Lin.cpp
49     GeomAPI_Lin2d.cpp
50     GeomAPI_Dir.cpp
51     GeomAPI_Dir2d.cpp
52     GeomAPI_Pln.cpp
53     GeomAPI_Shape.cpp
54     GeomAPI_ShapeExplorer.cpp
55     GeomAPI_Edge.cpp
56     GeomAPI_Face.cpp
57     GeomAPI_PlanarEdges.cpp
58     GeomAPI_AISObject.cpp
59     GeomAPI_Curve.cpp
60     GeomAPI_DataMapOfShapeMapOfShapes.cpp
61     GeomAPI_DataMapOfShapeShape.cpp
62     GeomAPI_Vertex.cpp
63     GeomAPI_ICustomPrs.cpp
64     GeomAPI_Ax1.cpp
65     GeomAPI_Ax2.cpp
66     GeomAPI_Ax3.cpp
67     GeomAPI_IPresentable.cpp
68     GeomAPI_Trsf.cpp
69 )
70
71 SET(PROJECT_LIBRARIES
72     ${CAS_KERNEL} 
73     ${CAS_MODELER} 
74     ${CAS_VIEWER}
75     ${CAS_SHAPE}
76     ${CAS_TKTopAlgo}
77 )
78
79 ADD_DEFINITIONS(-DGEOMAPI_EXPORTS ${CAS_DEFINITIONS})
80 ADD_LIBRARY(GeomAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
81
82 SET(CMAKE_SWIG_FLAGS -threads -Wall)
83
84 SET_SOURCE_FILES_PROPERTIES(GeomAPI.i PROPERTIES CPLUSPLUS ON)
85 SET_SOURCE_FILES_PROPERTIES(GeomAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
86
87 INCLUDE_DIRECTORIES(
88   ${CAS_INCLUDE_DIRS}
89 )
90
91 TARGET_LINK_LIBRARIES(GeomAPI ${PROJECT_LIBRARIES})
92
93 SET(SWIG_SCRIPTS
94   ${CMAKE_CURRENT_BINARY_DIR}/GeomAPI.py
95 )
96
97 SET(SWIG_LINK_LIBRARIES
98   GeomAPI
99   ${PYTHON_LIBRARIES}
100 )
101
102 SWIG_ADD_MODULE(GeomAPI python GeomAPI.i ${PROJECT_HEADERS})
103 SWIG_LINK_LIBRARIES(GeomAPI ${SWIG_LINK_LIBRARIES})
104
105 IF(WIN32)
106   SET_TARGET_PROPERTIES(_GeomAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomAPI_d)
107 ENDIF(WIN32)
108
109 INSTALL(TARGETS _GeomAPI DESTINATION swig)
110 INSTALL(TARGETS GeomAPI DESTINATION bin)
111 INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION swig)