]> SALOME platform Git repositories - modules/shaper.git/blob - src/GeomAlgoAPI/CMakeLists.txt
Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / GeomAlgoAPI / CMakeLists.txt
1 FIND_PACKAGE(SWIG REQUIRED)
2
3 INCLUDE(${SWIG_USE_FILE})
4 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
5
6 SET(PROJECT_HEADERS
7     GeomAlgoAPI.h
8     GeomAlgoAPI_CompoundBuilder.h
9     GeomAlgoAPI_FaceBuilder.h
10     GeomAlgoAPI_EdgeBuilder.h
11     GeomAlgoAPI_PointBuilder.h
12     GeomAlgoAPI_SketchBuilder.h
13     GeomAlgoAPI_Extrusion.h
14     GeomAlgoAPI_Boolean.h
15     GeomAlgoAPI_MakeShape.h
16     GeomAlgoAPI_DFLoader.h
17 )
18
19 SET(PROJECT_SOURCES
20     GeomAlgoAPI_CompoundBuilder.cpp
21     GeomAlgoAPI_FaceBuilder.cpp
22     GeomAlgoAPI_EdgeBuilder.cpp
23     GeomAlgoAPI_PointBuilder.cpp
24     GeomAlgoAPI_SketchBuilder.cpp
25     GeomAlgoAPI_Extrusion.cpp
26     GeomAlgoAPI_Boolean.cpp
27     GeomAlgoAPI_MakeShape.cpp
28     GeomAlgoAPI_DFLoader.cpp
29 )
30
31 SET(PROJECT_LIBRARIES
32     GeomAPI
33     ModelAPI 
34     ${CAS_TKBool} 
35     ${CAS_TKBO} 
36     ${CAS_TKPrim}
37     ${CAS_SHAPE}
38     ${CAS_TKTopAlgo}
39 )
40
41 ADD_DEFINITIONS(-DGEOMALGOAPI_EXPORTS ${CAS_DEFINITIONS})
42 ADD_LIBRARY(GeomAlgoAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
43
44 SET(CMAKE_SWIG_FLAGS "")
45
46 SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES CPLUSPLUS ON)
47 SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
48
49 INCLUDE_DIRECTORIES(
50   ../GeomAPI
51   ../ModelAPI
52   ${CAS_INCLUDE_DIRS}
53 )
54
55 TARGET_LINK_LIBRARIES(GeomAlgoAPI ${PROJECT_LIBRARIES})
56
57 SET(SWIG_SCRIPTS
58   ${CMAKE_CURRENT_BINARY_DIR}/GeomAlgoAPI.py
59 )
60
61 SET(SWIG_LINK_LIBRARIES
62   GeomAPI
63   GeomAlgoAPI
64   ${PYTHON_LIBRARIES}
65 )
66
67 SWIG_ADD_MODULE(GeomAlgoAPI python GeomAlgoAPI.i ${PROJECT_HEADERS})
68 SWIG_LINK_LIBRARIES(GeomAlgoAPI ${SWIG_LINK_LIBRARIES})
69
70 IF(WIN32)
71   SET_TARGET_PROPERTIES(_GeomAlgoAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomAlgoAPI_d)
72 ENDIF(WIN32)
73
74 INSTALL(TARGETS _GeomAlgoAPI DESTINATION swig)
75 INSTALL(TARGETS GeomAlgoAPI DESTINATION bin)
76 INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION swig)