Salome HOME
Adding Scale feature.
[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_Cylinder.h
47     GeomAlgoAPI_XAOExport.h
48     GeomAlgoAPI_XAOImport.h
49     GeomAlgoAPI_Copy.h
50     GeomAlgoAPI_ConeSegment.h
51     GeomAlgoAPI_Symmetry.h
52     GeomAlgoAPI_Scale.h
53 )
54
55 SET(PROJECT_SOURCES
56     GeomAlgoAPI_Tools.cpp
57     GeomAlgoAPI_CompoundBuilder.cpp
58     GeomAlgoAPI_FaceBuilder.cpp
59     GeomAlgoAPI_EdgeBuilder.cpp
60     GeomAlgoAPI_PointBuilder.cpp
61     GeomAlgoAPI_SketchBuilder.cpp
62     GeomAlgoAPI_Prism.cpp
63     GeomAlgoAPI_Revolution.cpp
64     GeomAlgoAPI_Boolean.cpp
65     GeomAlgoAPI_Rotation.cpp
66     GeomAlgoAPI_Translation.cpp
67     GeomAlgoAPI_MakeShape.cpp
68     GeomAlgoAPI_MakeShapeCustom.cpp
69     GeomAlgoAPI_MakeShapeList.cpp
70     GeomAlgoAPI_MakeSweep.cpp
71     GeomAlgoAPI_DFLoader.cpp
72     GeomAlgoAPI_Placement.cpp
73     GeomAlgoAPI_BREPImport.cpp
74     GeomAlgoAPI_STEPImport.cpp
75     GeomAlgoAPI_IGESImport.cpp
76     GeomAlgoAPI_BREPExport.cpp
77     GeomAlgoAPI_STEPExport.cpp
78     GeomAlgoAPI_IGESExport.cpp
79     GeomAlgoAPI_Transform.cpp
80     GeomAlgoAPI_ShapeTools.cpp
81     GeomAlgoAPI_Partition.cpp
82     GeomAlgoAPI_PaveFiller.cpp
83     GeomAlgoAPI_Intersection.cpp
84     GeomAlgoAPI_Pipe.cpp
85     GeomAlgoAPI_WireBuilder.cpp
86     GeomAlgoAPI_Sewing.cpp
87     GeomAlgoAPI_ShapeBuilder.cpp
88     GeomAlgoAPI_ShapeAPI.cpp
89     GeomAlgoAPI_Exception.cpp
90     GeomAlgoAPI_Box.cpp
91     GeomAlgoAPI_Cylinder.cpp
92     GeomAlgoAPI_XAOExport.cpp
93     GeomAlgoAPI_XAOImport.cpp
94     GeomAlgoAPI_Copy.cpp
95     GeomAlgoAPI_ConeSegment.cpp
96     GeomAlgoAPI_Symmetry.cpp
97     GeomAlgoAPI_Scale.cpp
98 )
99
100 SET(PROJECT_LIBRARIES
101     GeomAPI
102     GeomAlgoImpl
103     ModelAPI
104     XAO
105     ${CAS_OCAF}
106     ${CAS_SHAPE}
107     ${CAS_TKBO}
108     ${CAS_TKBool}
109     ${CAS_TKBRep}
110     ${CAS_TKCAF}
111     ${CAS_TKCAF}
112     ${CAS_TKLCAF}
113     ${CAS_TKPrim}
114     ${CAS_TKSTEP}
115     ${CAS_TKSTEPBase}
116     ${CAS_TKIGES}
117     ${CAS_TKTopAlgo}
118     ${CAS_TKXSBase}
119     ${CAS_TKOffset}
120     ${CAS_TKShHealing}
121 )
122
123 ADD_DEFINITIONS(-DGEOMALGOAPI_EXPORTS ${CAS_DEFINITIONS})
124 ADD_LIBRARY(GeomAlgoAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
125
126 SET(CMAKE_SWIG_FLAGS "-Wall")
127
128 SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES CPLUSPLUS ON)
129 SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
130
131 INCLUDE_DIRECTORIES(
132   ../GeomAPI
133   ../GeomAlgoImpl
134   ../ModelAPI
135   ../XAO
136   ${CAS_INCLUDE_DIRS}
137 )
138
139 TARGET_LINK_LIBRARIES(GeomAlgoAPI ${PROJECT_LIBRARIES})
140
141 SET(SWIG_SCRIPTS
142   ${CMAKE_CURRENT_BINARY_DIR}/GeomAlgoAPI.py
143 )
144
145 SET(SWIG_LINK_LIBRARIES
146   GeomAPI
147   GeomAlgoAPI
148   GeomAlgoImpl
149   ${PYTHON_LIBRARIES}
150 )
151
152 SWIG_ADD_MODULE(GeomAlgoAPI python GeomAlgoAPI.i ${PROJECT_HEADERS})
153 SWIG_LINK_LIBRARIES(GeomAlgoAPI ${SWIG_LINK_LIBRARIES})
154
155 IF(WIN32)
156   SET_TARGET_PROPERTIES(_GeomAlgoAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomAlgoAPI_d)
157 ENDIF(WIN32)
158
159 INSTALL(TARGETS _GeomAlgoAPI DESTINATION ${SHAPER_INSTALL_SWIG})
160 INSTALL(TARGETS GeomAlgoAPI DESTINATION ${SHAPER_INSTALL_BIN})
161 INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
162
163 ADD_UNIT_TESTS(TestAPI_Box.py
164                TestAPI_Cylinder.py
165                TestAPI_GDMLConeSegment.py
166                TestAPI_Scale.py
167                TestAPI_Symmetry.py
168                TestAPI_Translation.py)
169