]> SALOME platform Git repositories - modules/shaper.git/blob - src/GeomAPI/CMakeLists.txt
Salome HOME
Switch Wireframe/Shading with closing of context
[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_Edge.h
24     GeomAPI_Face.h
25     GeomAPI_PlanarEdges.h
26     GeomAPI_AISObject.h
27     GeomAPI_IPresentable.h
28     GeomAPI_Curve.h 
29     GeomAPI_DataMapOfShapeShape.h
30     GeomAPI_ICustomPrs.h
31     GeomAPI_Vertex.h
32 )
33
34 SET(PROJECT_SOURCES
35     GeomAPI_Circ.cpp
36     GeomAPI_Circ2d.cpp
37     GeomAPI_Interface.cpp
38     GeomAPI_XY.cpp
39     GeomAPI_XYZ.cpp
40     GeomAPI_Pnt.cpp
41     GeomAPI_Pnt2d.cpp
42     GeomAPI_Lin.cpp
43     GeomAPI_Lin2d.cpp
44     GeomAPI_Dir.cpp
45     GeomAPI_Dir2d.cpp
46     GeomAPI_Pln.cpp
47     GeomAPI_Shape.cpp
48     GeomAPI_Edge.cpp
49     GeomAPI_Face.cpp
50     GeomAPI_PlanarEdges.cpp
51     GeomAPI_AISObject.cpp
52     GeomAPI_Curve.cpp
53     GeomAPI_DataMapOfShapeShape.cpp
54     GeomAPI_Vertex.cpp
55 )
56
57 SET(PROJECT_LIBRARIES
58     ${CAS_KERNEL} 
59     ${CAS_MODELER} 
60     ${CAS_VIEWER}
61     ${CAS_SHAPE}
62     ${CAS_TKTopAlgo}
63 )
64
65 ADD_DEFINITIONS(-DGEOMAPI_EXPORTS ${CAS_DEFINITIONS})
66 ADD_LIBRARY(GeomAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
67
68 SET(CMAKE_SWIG_FLAGS -threads -Wall)
69
70 SET_SOURCE_FILES_PROPERTIES(GeomAPI.i PROPERTIES CPLUSPLUS ON)
71 SET_SOURCE_FILES_PROPERTIES(GeomAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
72
73 INCLUDE_DIRECTORIES(
74   ${CAS_INCLUDE_DIRS}
75 )
76
77 TARGET_LINK_LIBRARIES(GeomAPI ${PROJECT_LIBRARIES})
78
79 SET(SWIG_SCRIPTS
80   ${CMAKE_CURRENT_BINARY_DIR}/GeomAPI.py
81 )
82
83 SET(SWIG_LINK_LIBRARIES
84   GeomAPI
85   ${PYTHON_LIBRARIES}
86 )
87
88 SWIG_ADD_MODULE(GeomAPI python GeomAPI.i ${PROJECT_HEADERS})
89 SWIG_LINK_LIBRARIES(GeomAPI ${SWIG_LINK_LIBRARIES})
90
91 IF(WIN32)
92   SET_TARGET_PROPERTIES(_GeomAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomAPI_d)
93 ENDIF(WIN32)
94
95 INSTALL(TARGETS _GeomAPI DESTINATION swig)
96 INSTALL(TARGETS GeomAPI DESTINATION bin)
97 INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION swig)