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