]> SALOME platform Git repositories - modules/shaper.git/blob - src/GeomAlgoAPI/CMakeLists.txt
Salome HOME
d79ee14662f6884d08274d97dca9b81c08546388
[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 INCLUDE(UnitTest)
8
9 SET(PROJECT_HEADERS
10     GeomAlgoAPI.h
11     GeomAlgoAPI_Tools.h
12     GeomAlgoAPI_CompoundBuilder.h
13     GeomAlgoAPI_FaceBuilder.h
14     GeomAlgoAPI_EdgeBuilder.h
15     GeomAlgoAPI_PointBuilder.h
16     GeomAlgoAPI_SketchBuilder.h
17     GeomAlgoAPI_Prism.h
18     GeomAlgoAPI_Revolution.h
19     GeomAlgoAPI_Boolean.h
20     GeomAlgoAPI_Rotation.h
21     GeomAlgoAPI_Translation.h
22     GeomAlgoAPI_MakeShape.h
23     GeomAlgoAPI_MakeShapeCustom.h
24     GeomAlgoAPI_MakeShapeList.h
25     GeomAlgoAPI_MakeSweep.h
26     GeomAlgoAPI_DFLoader.h
27     GeomAlgoAPI_Placement.h
28     GeomAlgoAPI_BREPImport.h
29     GeomAlgoAPI_STEPImport.h
30     GeomAlgoAPI_IGESImport.h
31     GeomAlgoAPI_BREPExport.h
32     GeomAlgoAPI_STEPExport.h
33     GeomAlgoAPI_IGESExport.h
34     GeomAlgoAPI_Transform.h
35     GeomAlgoAPI_ShapeTools.h
36     GeomAlgoAPI_Partition.h
37     GeomAlgoAPI_PaveFiller.h
38     GeomAlgoAPI_Intersection.h
39     GeomAlgoAPI_Pipe.h
40     GeomAlgoAPI_WireBuilder.h
41     GeomAlgoAPI_Sewing.h
42     GeomAlgoAPI_ShapeBuilder.h
43     GeomAlgoAPI_ShapeAPI.h
44     GeomAlgoAPI_Exception.h
45     GeomAlgoAPI_Box.h
46     GeomAlgoAPI_XAOExport.h
47     GeomAlgoAPI_XAOImport.h
48     GeomAlgoAPI_Copy.h
49     GeomAlgoAPI_ConeSegment.h
50 )
51
52 SET(PROJECT_SOURCES
53     GeomAlgoAPI_Tools.cpp
54     GeomAlgoAPI_CompoundBuilder.cpp
55     GeomAlgoAPI_FaceBuilder.cpp
56     GeomAlgoAPI_EdgeBuilder.cpp
57     GeomAlgoAPI_PointBuilder.cpp
58     GeomAlgoAPI_SketchBuilder.cpp
59     GeomAlgoAPI_Prism.cpp
60     GeomAlgoAPI_Revolution.cpp
61     GeomAlgoAPI_Boolean.cpp
62     GeomAlgoAPI_Rotation.cpp
63     GeomAlgoAPI_Translation.cpp
64     GeomAlgoAPI_MakeShape.cpp
65     GeomAlgoAPI_MakeShapeCustom.cpp
66     GeomAlgoAPI_MakeShapeList.cpp
67     GeomAlgoAPI_MakeSweep.cpp
68     GeomAlgoAPI_DFLoader.cpp
69     GeomAlgoAPI_Placement.cpp
70     GeomAlgoAPI_BREPImport.cpp
71     GeomAlgoAPI_STEPImport.cpp
72     GeomAlgoAPI_IGESImport.cpp
73     GeomAlgoAPI_BREPExport.cpp
74     GeomAlgoAPI_STEPExport.cpp
75     GeomAlgoAPI_IGESExport.cpp
76     GeomAlgoAPI_Transform.cpp
77     GeomAlgoAPI_ShapeTools.cpp
78     GeomAlgoAPI_Partition.cpp
79     GeomAlgoAPI_PaveFiller.cpp
80     GeomAlgoAPI_Intersection.cpp
81     GeomAlgoAPI_Pipe.cpp
82     GeomAlgoAPI_WireBuilder.cpp
83     GeomAlgoAPI_Sewing.cpp
84     GeomAlgoAPI_ShapeBuilder.cpp
85     GeomAlgoAPI_ShapeAPI.cpp
86     GeomAlgoAPI_Exception.cpp
87     GeomAlgoAPI_Box.cpp
88     GeomAlgoAPI_XAOExport.cpp
89     GeomAlgoAPI_XAOImport.cpp
90     GeomAlgoAPI_Copy.cpp
91     GeomAlgoAPI_ConeSegment.cpp
92 )
93
94 SET(PROJECT_LIBRARIES
95     GeomAPI
96     GeomAlgoImpl
97     ModelAPI
98     XAO
99     ${CAS_OCAF}
100     ${CAS_SHAPE}
101     ${CAS_TKBO}
102     ${CAS_TKBool}
103     ${CAS_TKBRep}
104     ${CAS_TKCAF}
105     ${CAS_TKCAF}
106     ${CAS_TKLCAF}
107     ${CAS_TKPrim}
108     ${CAS_TKSTEP}
109     ${CAS_TKSTEPBase}
110     ${CAS_TKIGES}
111     ${CAS_TKTopAlgo}
112     ${CAS_TKXSBase}
113     ${CAS_TKOffset}
114 )
115
116 ADD_DEFINITIONS(-DGEOMALGOAPI_EXPORTS ${CAS_DEFINITIONS})
117 ADD_LIBRARY(GeomAlgoAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
118
119 SET(CMAKE_SWIG_FLAGS "-Wall")
120
121 SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES CPLUSPLUS ON)
122 SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
123
124 INCLUDE_DIRECTORIES(
125   ../GeomAPI
126   ../GeomAlgoImpl
127   ../ModelAPI
128   ../XAO
129   ${CAS_INCLUDE_DIRS}
130 )
131
132 TARGET_LINK_LIBRARIES(GeomAlgoAPI ${PROJECT_LIBRARIES})
133
134 SET(SWIG_SCRIPTS
135   ${CMAKE_CURRENT_BINARY_DIR}/GeomAlgoAPI.py
136 )
137
138 SET(SWIG_LINK_LIBRARIES
139   GeomAPI
140   GeomAlgoAPI
141   GeomAlgoImpl
142   ${PYTHON_LIBRARIES}
143 )
144
145 SWIG_ADD_MODULE(GeomAlgoAPI python GeomAlgoAPI.i ${PROJECT_HEADERS})
146 SWIG_LINK_LIBRARIES(GeomAlgoAPI ${SWIG_LINK_LIBRARIES})
147
148 IF(WIN32)
149   SET_TARGET_PROPERTIES(_GeomAlgoAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomAlgoAPI_d)
150 ENDIF(WIN32)
151
152 INSTALL(TARGETS _GeomAlgoAPI DESTINATION ${SHAPER_INSTALL_SWIG})
153 INSTALL(TARGETS GeomAlgoAPI DESTINATION ${SHAPER_INSTALL_BIN})
154 INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
155
156 ADD_UNIT_TESTS(TestAPI_Box.py
157                TestAPI_GDMLConeSegment.py
158                TestAPI_Translation.py)
159