]> SALOME platform Git repositories - modules/shaper.git/blob - src/GeomAlgoAPI/CMakeLists.txt
Salome HOME
Merge branch 'Dev_1.5.0' of salome:modules/shaper into Dev_1.5.0
[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_Tools.h
11     GeomAlgoAPI_CompoundBuilder.h
12     GeomAlgoAPI_FaceBuilder.h
13     GeomAlgoAPI_EdgeBuilder.h
14     GeomAlgoAPI_PointBuilder.h
15     GeomAlgoAPI_SketchBuilder.h
16     GeomAlgoAPI_Prism.h
17     GeomAlgoAPI_Revolution.h
18     GeomAlgoAPI_Boolean.h
19     GeomAlgoAPI_Rotation.h
20     GeomAlgoAPI_Translation.h
21     GeomAlgoAPI_MakeShape.h
22     GeomAlgoAPI_MakeShapeCustom.h
23     GeomAlgoAPI_MakeShapeList.h
24     GeomAlgoAPI_DFLoader.h
25     GeomAlgoAPI_Placement.h
26     GeomAlgoAPI_BREPImport.h
27     GeomAlgoAPI_STEPImport.h
28     GeomAlgoAPI_IGESImport.h
29     GeomAlgoAPI_BREPExport.h
30     GeomAlgoAPI_STEPExport.h
31     GeomAlgoAPI_IGESExport.h
32     GeomAlgoAPI_Transform.h
33     GeomAlgoAPI_ShapeTools.h
34     GeomAlgoAPI_Partition.h
35     GeomAlgoAPI_PaveFiller.h
36 )
37
38 SET(PROJECT_SOURCES
39     GeomAlgoAPI_Tools.cpp
40     GeomAlgoAPI_CompoundBuilder.cpp
41     GeomAlgoAPI_FaceBuilder.cpp
42     GeomAlgoAPI_EdgeBuilder.cpp
43     GeomAlgoAPI_PointBuilder.cpp
44     GeomAlgoAPI_SketchBuilder.cpp
45     GeomAlgoAPI_Prism.cpp
46     GeomAlgoAPI_Revolution.cpp
47     GeomAlgoAPI_Boolean.cpp
48     GeomAlgoAPI_Rotation.cpp
49     GeomAlgoAPI_Translation.cpp
50     GeomAlgoAPI_MakeShape.cpp
51     GeomAlgoAPI_MakeShapeCustom.cpp
52     GeomAlgoAPI_MakeShapeList.cpp
53     GeomAlgoAPI_DFLoader.cpp
54     GeomAlgoAPI_Placement.cpp
55     GeomAlgoAPI_BREPImport.cpp
56     GeomAlgoAPI_STEPImport.cpp
57     GeomAlgoAPI_IGESImport.cpp
58     GeomAlgoAPI_BREPExport.cpp
59     GeomAlgoAPI_STEPExport.cpp
60     GeomAlgoAPI_IGESExport.cpp
61     GeomAlgoAPI_Transform.cpp
62     GeomAlgoAPI_ShapeTools.cpp
63     GeomAlgoAPI_Partition.cpp
64     GeomAlgoAPI_PaveFiller.cpp
65 )
66
67 SET(PROJECT_LIBRARIES
68     GeomAPI
69     GeomAlgoImpl
70     ModelAPI
71     ${CAS_OCAF}
72     ${CAS_SHAPE}
73     ${CAS_TKBO} 
74     ${CAS_TKBool} 
75     ${CAS_TKBRep}
76     ${CAS_TKCAF}
77     ${CAS_TKCAF}
78     ${CAS_TKLCAF}
79     ${CAS_TKPrim}
80     ${CAS_TKSTEP}
81     ${CAS_TKSTEPBase}
82     ${CAS_TKIGES}
83     ${CAS_TKTopAlgo}
84     ${CAS_TKXSBase}
85     ${CAS_TKOffset}
86 )
87
88 ADD_DEFINITIONS(-DGEOMALGOAPI_EXPORTS ${CAS_DEFINITIONS})
89 ADD_LIBRARY(GeomAlgoAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
90
91 SET(CMAKE_SWIG_FLAGS "-Wall")
92
93 SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES CPLUSPLUS ON)
94 SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
95
96 INCLUDE_DIRECTORIES(
97   ../GeomAPI
98   ../GeomAlgoImpl
99   ../ModelAPI
100   ${CAS_INCLUDE_DIRS}
101 )
102
103 TARGET_LINK_LIBRARIES(GeomAlgoAPI ${PROJECT_LIBRARIES})
104
105 SET(SWIG_SCRIPTS
106   ${CMAKE_CURRENT_BINARY_DIR}/GeomAlgoAPI.py
107 )
108
109 SET(SWIG_LINK_LIBRARIES
110   GeomAPI
111   GeomAlgoAPI
112   GeomAlgoImpl
113   ${PYTHON_LIBRARIES}
114 )
115
116 SWIG_ADD_MODULE(GeomAlgoAPI python GeomAlgoAPI.i ${PROJECT_HEADERS})
117 SWIG_LINK_LIBRARIES(GeomAlgoAPI ${SWIG_LINK_LIBRARIES})
118
119 IF(WIN32)
120   SET_TARGET_PROPERTIES(_GeomAlgoAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomAlgoAPI_d)
121 ENDIF(WIN32)
122
123 INSTALL(TARGETS _GeomAlgoAPI DESTINATION swig)
124 INSTALL(TARGETS GeomAlgoAPI DESTINATION bin)
125 INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION swig)