/
CMakeLists.txt
321 lines (305 loc) · 7.47 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
if(MSVC)
add_definitions(-DFCAppPart -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH)
else(MSVC)
add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H)
endif(MSVC)
if(FREETYPE_FOUND)
add_definitions(-DFCUseFreeType)
endif(FREETYPE_FOUND)
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/src
${CMAKE_SOURCE_DIR}/src
${CMAKE_CURRENT_BINARY_DIR}
${Boost_INCLUDE_DIRS}
${OCC_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
${QT_INCLUDE_DIR}
${XercesC_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIR}
${FREETYPE_INCLUDE_DIRS}
${QT_INCLUDE_DIR}
)
link_directories(${OCC_LIBRARY_DIR})
set(Part_LIBS
${OCC_LIBRARIES}
${OCC_DEBUG_LIBRARIES}
FreeCADApp
)
if(FREETYPE_FOUND)
set(Part_LIBS
${Part_LIBS}
${FREETYPE_LIBRARIES}
)
endif(FREETYPE_FOUND)
generate_from_xml(ArcPy)
generate_from_xml(ArcOfCirclePy)
generate_from_xml(ArcOfParabolaPy)
generate_from_xml(BodyBasePy)
generate_from_xml(CirclePy)
generate_from_xml(ArcOfEllipsePy)
generate_from_xml(EllipsePy)
generate_from_xml(HyperbolaPy)
generate_from_xml(ArcOfHyperbolaPy)
generate_from_xml(ParabolaPy)
generate_from_xml(OffsetCurvePy)
generate_from_xml(GeometryPy)
generate_from_xml(GeometryCurvePy)
generate_from_xml(GeometrySurfacePy)
generate_from_xml(LinePy)
generate_from_xml(PointPy)
generate_from_xml(BezierCurvePy)
generate_from_xml(BSplineCurvePy)
generate_from_xml(PlanePy)
generate_from_xml(ConePy)
generate_from_xml(CylinderPy)
generate_from_xml(SpherePy)
generate_from_xml(ToroidPy)
generate_from_xml(BezierSurfacePy)
generate_from_xml(BSplineSurfacePy)
generate_from_xml(OffsetSurfacePy)
generate_from_xml(PlateSurfacePy)
generate_from_xml(RectangularTrimmedSurfacePy)
generate_from_xml(SurfaceOfExtrusionPy)
generate_from_xml(SurfaceOfRevolutionPy)
generate_from_xml(PartFeaturePy)
generate_from_xml(AttachableObjectPy)
generate_from_xml(Part2DObjectPy)
generate_from_xml(AttachEnginePy)
generate_from_xml(TopoShapePy)
generate_from_xml(TopoShapeCompoundPy)
generate_from_xml(TopoShapeCompSolidPy)
generate_from_xml(TopoShapeEdgePy)
generate_from_xml(TopoShapeFacePy)
generate_from_xml(TopoShapeShellPy)
generate_from_xml(TopoShapeSolidPy)
generate_from_xml(TopoShapeVertexPy)
generate_from_xml(TopoShapeWirePy)
generate_from_xml(BRepOffsetAPI_MakePipeShellPy)
SET(Features_SRCS
FeaturePartBoolean.cpp
FeaturePartBoolean.h
FeaturePartBox.cpp
FeaturePartBox.h
FeaturePartCircle.cpp
FeaturePartCircle.h
FeaturePartCommon.cpp
FeaturePartCommon.h
FeaturePartCurveNet.cpp
FeaturePartCurveNet.h
FeaturePartCut.cpp
FeaturePartCut.h
FeaturePartFuse.cpp
FeaturePartFuse.h
FeaturePartImportBrep.cpp
FeaturePartImportBrep.h
FeaturePartImportIges.cpp
FeaturePartImportIges.h
FeaturePartImportStep.cpp
FeaturePartImportStep.h
FeaturePartPolygon.cpp
FeaturePartPolygon.h
FeaturePartSection.cpp
FeaturePartSection.h
FeaturePartSpline.cpp
FeaturePartSpline.h
FeatureChamfer.cpp
FeatureChamfer.h
FeatureCompound.cpp
FeatureCompound.h
FeatureExtrusion.cpp
FeatureExtrusion.h
FeatureFace.cpp
FeatureFace.h
FeatureFillet.cpp
FeatureFillet.h
FeatureMirroring.cpp
FeatureMirroring.h
FeatureRevolution.cpp
FeatureRevolution.h
FeatureOffset.cpp
FeatureOffset.h
PartFeatures.cpp
PartFeatures.h
PartFeature.cpp
PartFeature.h
PartFeatureReference.cpp
PartFeatureReference.h
Part2DObject.cpp
Part2DObject.h
PrimitiveFeature.cpp
PrimitiveFeature.h
FeatureGeometrySet.h
FeatureGeometrySet.cpp
CustomFeature.cpp
CustomFeature.h
BodyBase.h
BodyBase.cpp
DatumFeature.cpp
DatumFeature.h
AttachableObject.h
AttachableObject.cpp
)
SOURCE_GROUP("Features" FILES ${Features_SRCS})
SET(Properties_SRCS
PropertyTopoShape.cpp
PropertyTopoShape.h
PropertyGeometryList.cpp
PropertyGeometryList.h
)
SOURCE_GROUP("Properties" FILES ${Properties_SRCS})
SET(Python_SRCS
ArcPy.xml
ArcPyImp.cpp
ArcOfCirclePy.xml
ArcOfCirclePyImp.cpp
ArcOfParabolaPy.xml
ArcOfParabolaPyImp.cpp
BodyBasePy.xml
BodyBasePyImp.cpp
CirclePy.xml
CirclePyImp.cpp
ArcOfEllipsePy.xml
ArcOfEllipsePyImp.cpp
EllipsePy.xml
EllipsePyImp.cpp
HyperbolaPy.xml
HyperbolaPyImp.cpp
ArcOfHyperbolaPy.xml
ArcOfHyperbolaPyImp.cpp
ParabolaPy.xml
ParabolaPyImp.cpp
OffsetCurvePy.xml
OffsetCurvePyImp.cpp
GeometryPy.xml
GeometryPyImp.cpp
GeometryCurvePy.xml
GeometryCurvePyImp.cpp
GeometrySurfacePy.xml
GeometrySurfacePyImp.cpp
LinePy.xml
LinePyImp.cpp
PointPy.xml
PointPyImp.cpp
BezierCurvePy.xml
BezierCurvePyImp.cpp
BSplineCurvePy.xml
BSplineCurvePyImp.cpp
PlanePy.xml
PlanePyImp.cpp
ConePy.xml
ConePyImp.cpp
CylinderPy.xml
CylinderPyImp.cpp
SpherePy.xml
SpherePyImp.cpp
ToroidPy.xml
ToroidPyImp.cpp
BezierSurfacePy.xml
BezierSurfacePyImp.cpp
BSplineSurfacePy.xml
BSplineSurfacePyImp.cpp
OffsetSurfacePy.xml
OffsetSurfacePyImp.cpp
PlateSurfacePy.xml
PlateSurfacePyImp.cpp
RectangularTrimmedSurfacePy.xml
RectangularTrimmedSurfacePyImp.cpp
SurfaceOfExtrusionPy.xml
SurfaceOfExtrusionPyImp.cpp
SurfaceOfRevolutionPy.xml
SurfaceOfRevolutionPyImp.cpp
PartFeaturePy.xml
PartFeaturePyImp.cpp
AttachableObjectPy.xml
AttachableObjectPyImp.cpp
Part2DObjectPy.xml
Part2DObjectPyImp.cpp
AttachEnginePy.xml
AttachEnginePyImp.cpp
TopoShapePy.xml
TopoShapePyImp.cpp
TopoShapeCompSolidPy.xml
TopoShapeCompSolidPyImp.cpp
TopoShapeCompoundPy.xml
TopoShapeCompoundPyImp.cpp
TopoShapeEdgePy.xml
TopoShapeEdgePyImp.cpp
TopoShapeFacePy.xml
TopoShapeFacePyImp.cpp
TopoShapeShellPy.xml
TopoShapeShellPyImp.cpp
TopoShapeSolidPy.xml
TopoShapeSolidPyImp.cpp
TopoShapeVertexPy.xml
TopoShapeVertexPyImp.cpp
TopoShapeWirePy.xml
TopoShapeWirePyImp.cpp
BRepOffsetAPI_MakePipeShellPy.xml
BRepOffsetAPI_MakePipeShellPyImp.cpp
)
SOURCE_GROUP("Python" FILES ${Python_SRCS})
SET(Part_SRCS
${Features_SRCS}
${Properties_SRCS}
${Python_SRCS}
Attacher.cpp
Attacher.h
AppPart.cpp
AppPartPy.cpp
BSplineCurveBiArcs.cpp
CrossSection.cpp
CrossSection.h
Geometry.cpp
Geometry.h
ImportIges.cpp
ImportIges.h
ImportStep.cpp
ImportStep.h
PreCompiled.cpp
PreCompiled.h
ProgressIndicator.cpp
ProgressIndicator.h
TopoShape.cpp
TopoShape.h
edgecluster.cpp
edgecluster.h
modelRefine.cpp
modelRefine.h
Tools.cpp
Tools.h
encodeFilename.h
OCCError.h
FT2FC.cpp
FT2FC.h
FaceMaker.cpp
FaceMaker.h
)
SET(Part_Scripts
Init.py
TestPartApp.py
MakeBottle.py
JoinFeatures.py
AttachmentEditor/__init__.py
AttachmentEditor/Commands.py
AttachmentEditor/FrozenClass.py
AttachmentEditor/TaskAttachmentEditor.py
AttachmentEditor/TaskAttachmentEditor.ui
BOPTools/__init__.py
BOPTools/GeneralFuseResult.py
BOPTools/JoinAPI.py
BOPTools/JoinFeatures.py
BOPTools/ShapeMerge.py
BOPTools/SplitAPI.py
BOPTools/SplitFeatures.py
BOPTools/Utils.py
)
add_library(Part SHARED ${Part_SRCS})
target_link_libraries(Part ${Part_LIBS})
fc_target_copy_resource(Part
${CMAKE_SOURCE_DIR}/src/Mod/Part
${CMAKE_BINARY_DIR}/Mod/Part
${Part_Scripts})
SET_BIN_DIR(Part Part /Mod/Part)
SET_PYTHON_PREFIX_SUFFIX(Part)
INSTALL(TARGETS Part DESTINATION ${CMAKE_INSTALL_LIBDIR})