-
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathPackage.swift
More file actions
121 lines (114 loc) · 4.88 KB
/
Package.swift
File metadata and controls
121 lines (114 loc) · 4.88 KB
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
// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "Fabric",
platforms: [.macOS(.v15), .iOS(.v18), .visionOS(.v2)],
products: [
.library(
name: "Fabric",
targets: ["Fabric"]
),
],
dependencies: [
// Local Satin package
.package(path: "Satin"),
// External dependencies
.package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.7"),
.package(url: "https://github.com/ml-explore/mlx-swift", from: "0.29.1"),
.package(url: "https://github.com/ml-explore/mlx-swift-lm", from: "2.29.1"),
.package(url: "https://github.com/apple/swift-async-algorithms.git", from: "1.0.0"),
.package(url: "https://github.com/tayloraswift/swift-noise", from: "1.0.0"),
.package(url: "https://github.com/vade/SwiftSimplify", branch: "master"),
.package(url: "https://github.com/gonzalezreal/textual", from: "0.1.1"),
.package(url: "https://github.com/bradhowes/swift-math-parser", from: "3.5.0"),
.package(url: "https://github.com/orchetect/OSCKit", from: "2.1.1"),
.package(url: "https://github.com/orchetect/MIDIKit", from: "0.10.7"),
.package(url: "https://github.com/mchakravarty/CodeEditorView.git", from: "0.7.0"),
],
targets: [
// C++ support for SuperShapeGenerator
.target(
name: "FabricCore",
dependencies: [
.product(name: "SatinCore", package: "Satin"),
],
path: "Fabric/Nodes/Geometry/SuperShape",
sources: ["SuperShapeGenerator.mm"],
publicHeadersPath: ".",
cSettings: [
.headerSearchPath("."),
.unsafeFlags(["-I", "Satin/Sources/SatinCore/include"]),
],
cxxSettings: [
.headerSearchPath("."),
.unsafeFlags(["-I", "Satin/Sources/SatinCore/include"]),
]
),
// Main Fabric framework
.target(
name: "Fabric",
dependencies: [
"FabricCore",
.product(name: "Satin", package: "Satin"),
.product(name: "SatinCore", package: "Satin"),
.product(name: "AnyCodable", package: "AnyCodable"),
.product(name: "MLX", package: "mlx-swift"),
.product(name: "MLXFFT", package: "mlx-swift"),
.product(name: "MLXFast", package: "mlx-swift"),
.product(name: "MLXLinalg", package: "mlx-swift"),
.product(name: "MLXNN", package: "mlx-swift"),
.product(name: "MLXLLM", package: "mlx-swift-lm"),
.product(name: "MLXVLM", package: "mlx-swift-lm"),
.product(name: "MLXLMCommon", package: "mlx-swift-lm"),
.product(name: "MLXEmbedders", package: "mlx-swift-lm"),
.product(name: "AsyncAlgorithms", package: "swift-async-algorithms"),
.product(name: "Noise", package: "swift-noise"),
.product(name: "SwiftSimplify", package: "SwiftSimplify"),
.product(name: "Textual", package: "textual"),
.product(name: "MathParser", package: "swift-math-parser"),
.product(name: "OSCKit", package: "OSCKit"),
.product(name: "MIDIKit", package: "MIDIKit"),
.product(name: "CodeEditorView", package: "CodeEditorView"),
.product(name: "LanguageSupport", package: "CodeEditorView"),
.target(name: "Syphon", condition: .when(platforms: [.macOS])),
],
path: "Fabric",
exclude: [
"Nodes/Geometry/SuperShape/SuperShapeGenerator.mm",
"Nodes/Geometry/SuperShape/SuperShapeGenerator.h",
"Nodes/Deprecated",
"Nodes/Parameters/Number/Deprecated",
"module.modulemap",
"Fabric.h",
"Fabric.docc",
],
resources: [
.copy("Effects"),
.copy("EffectsTwoChannel"),
.copy("EffectsThreeChannel"),
.copy("Compute"),
.copy("Shaders"),
.copy("Materials"),
.process("Fabric.xcassets"),
.copy("lygia"),
],
swiftSettings: [
.define("FABRIC_SYPHON_ENABLED", .when(platforms: [.macOS])),
]
),
// Syphon binary target (macOS only)
.binaryTarget(
name: "Syphon",
path: "Frameworks/Syphon.xcframework"
),
// Tests
.testTarget(
name: "FabricTests",
dependencies: ["Fabric"],
path: "Tests"
),
],
swiftLanguageModes: [.v5],
cxxLanguageStandard: .cxx17
)