forked from henrybetts/swift-webgpu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
90 lines (84 loc) · 2.46 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
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
// swift-tools-version:5.5
import PackageDescription
let package = Package(
name: "swift-webgpu",
platforms: [.macOS("10.15")],
products: [
.library(
name: "WebGPU",
targets: ["WebGPU"]),
.library(
name: "DawnNative",
targets: ["DawnNative", "WebGPU"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.0.0"),
.package(url: "https://github.com/SwiftGFX/SwiftMath", from: "3.3.0") // for demos only
],
targets: [
.systemLibrary(
name: "CWebGPU",
pkgConfig: "webgpu"
),
.target(
name: "WebGPU",
dependencies: ["CWebGPU"],
plugins: [.plugin(name: "GenerateWebGPUPlugin")]
),
.target(
name: "CDawnNative",
dependencies: ["CWebGPU"]
),
.target(
name: "DawnNative",
dependencies: ["WebGPU", "CDawnNative"]
),
.executableTarget(
name: "generate-webgpu",
dependencies: [.product(name: "ArgumentParser", package: "swift-argument-parser")]
),
.plugin(
name: "GenerateWebGPUPlugin",
capability: .buildTool(),
dependencies: ["generate-webgpu"]
),
.systemLibrary(
name: "CGLFW",
path: "Demos/CGLFW",
pkgConfig: "glfw3",
providers: [
.brew(["glfw"])]
),
.target(
name: "WindowUtils",
dependencies: ["WebGPU", "CGLFW"],
path: "Demos/WindowUtils"
),
.executableTarget(
name: "DemoInfo",
dependencies: ["DawnNative"],
path: "Demos/DemoInfo"
),
.executableTarget(
name: "DemoClearColor",
dependencies: ["WindowUtils"],
path: "Demos/DemoClearColor"
),
.executableTarget(
name: "DemoTriangle",
dependencies: ["WindowUtils"],
path: "Demos/DemoTriangle"
),
.executableTarget(
name: "DemoCube",
dependencies: ["WindowUtils", "SwiftMath"],
path: "Demos/DemoCube"
),
.executableTarget(
name: "DemoBoids",
dependencies: ["WindowUtils"],
path: "Demos/DemoBoids"
)
],
cxxLanguageStandard: .cxx17
)