-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPackage.swift
58 lines (55 loc) · 1.74 KB
/
Package.swift
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
// swift-tools-version: 6.0
import PackageDescription
// If you get "invalid custom path" errors, you probably forgot to initialize submodules.
// git submodule update --init --recursive
let package = Package(
name: "manifold-swift",
products: [
.library(name: "Manifold", targets: ["Manifold3D"]),
],
targets: [
.target(
name: "Clipper2",
path: "External/clipper2/CPP/Clipper2Lib",
sources: ["src"]
),
.target(
name: "oneTBB",
path: "External/oneTBB",
exclude: [
"examples",
"src/tbb/CMakeLists.txt",
"src/tbb/tbb.rc",
],
sources: ["src/tbb"],
publicHeadersPath: "include",
cxxSettings: [
.define("_XOPEN_SOURCE", to: "700"),
.define("_DARWIN_C_SOURCE"),
.define("__TBB_DYNAMIC_LOAD_ENABLED", to: "0"),
.define("__TBB_WAITPKG_INTRINSICS_PRESENT", to: "0"),
.define("__TBB_TSX_INTRINSICS_PRESENT", to: "0")
]
),
.target(
name: "ManifoldCPP",
dependencies: ["Clipper2", "oneTBB"],
path: "External/manifold",
exclude: ["src/CMakeLists.txt", "src/meshIO"],
sources: ["src"],
cxxSettings: [
.define("MANIFOLD_PAR", to: "1")
]
),
.target(
name: "ManifoldBridge",
dependencies: ["ManifoldCPP"]
),
.target(
name: "Manifold3D",
dependencies: ["ManifoldCPP", "ManifoldBridge"],
swiftSettings: [.interoperabilityMode(.Cxx)]
)
],
cxxLanguageStandard: .cxx17
)