-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Package.swift
154 lines (151 loc) · 4.52 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
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
// swift-tools-version: 5.10
import PackageDescription
let package = Package(
name: "Kraken",
platforms: [
.macOS(.v14),
.visionOS(.v1),
.iOS(.v17),
.tvOS(.v17),
.watchOS(.v10)
],
// --- 📦 Package Products. ---
products: [
// --- 🎨 Editors ---
.library(
name: "CosmoEditor",
targets: ["CodeView", "CosmoEditor"]
),
.library(
name: "CodeLanguages",
targets: ["LanguagesBundle", "CodeLanguages"]
),
// --- 🦑 Kraken ---
.library(
name: "KrakenKit",
targets: ["KrakenKit"]
),
.library(
name: "KrakenLib",
targets: ["KrakenLib"]
),
.executable(
name: "Kraken",
targets: ["Kraken"]
),
],
// --- 🦄 Package Dependencies. ---
dependencies: [
// .package(url: "https://github.com/stackotter/swift-cross-ui", revision: "f57f7ab"),
.package(url: "https://github.com/wabiverse/MetaversePlugin.git", from: "1.0.0"),
.package(url: "https://github.com/wabiverse/KrakenPlugs.git", from: "1.0.0"),
.package(url: "https://github.com/wabiverse/SwiftUSD.git", from: "24.8.0"),
.package(url: "https://github.com/ChimeHQ/SwiftTreeSitter", revision: "96ad58b"),
.package(url: "https://github.com/ChimeHQ/TextFormation.git", from: "0.8.2"),
.package(url: "https://github.com/ChimeHQ/TextStory.git", from: "0.8.0"),
.package(url: "https://github.com/apple/swift-collections", from: "1.1.0"),
],
// --- 🎯 Package Targets. ---
targets: [
// --- 🦑 Kraken ---
.target(
name: "KrakenKit",
dependencies: [
.product(name: "PixarUSD", package: "SwiftUSD"),
],
swiftSettings: [
.interoperabilityMode(.Cxx)
]
),
.target(
name: "KrakenLib",
dependencies: [
.product(name: "PixarUSD", package: "SwiftUSD"),
],
swiftSettings: [
.interoperabilityMode(.Cxx)
]
),
.executableTarget(
name: "Kraken",
dependencies: [
.product(name: "PixarUSD", package: "SwiftUSD"),
.product(name: "MetaversePlugin", package: "MetaversePlugin"),
.product(name: "KrakenPlug", package: "KrakenPlugs"),
.target(name: "KrakenKit"),
.target(name: "KrakenLib"),
.target(name: "CosmoEditor"),
],
resources: [
.process("Resources")
],
swiftSettings: [
.interoperabilityMode(.Cxx)
]
),
// --- 🎨 Editors ---
.target(
name: "CosmoEditor",
dependencies: [
.target(name: "CodeView"),
.target(name: "CodeLanguages"),
.product(name: "TextFormation", package: "TextFormation"),
],
path: "Sources/Editors/Code/Cosmo"
),
.target(
name: "CodeView",
dependencies: [
.product(name: "TextStory", package: "TextStory"),
.product(name: "Collections", package: "swift-collections"),
],
path: "Sources/Editors/Code/CodeView"
),
.target(
name: "LanguagesBundle",
path: "Sources/Editors/Code/LanguagesBundle",
publicHeadersPath: "include",
cSettings: [
.headerSearchPath("TreeSitterC/include"),
.headerSearchPath("TreeSitterCPP/include"),
.headerSearchPath("TreeSitterGalah/include"),
.headerSearchPath("TreeSitterJSDoc/include"),
.headerSearchPath("TreeSitterJSON/include"),
.headerSearchPath("TreeSitterPython/include"),
.headerSearchPath("TreeSitterRust/include"),
.headerSearchPath("TreeSitterSwift/include"),
.headerSearchPath("TreeSitterTOML/include"),
.headerSearchPath("TreeSitterUSD/include"),
]
),
.target(
name: "CodeLanguages",
dependencies: [
.target(name: "LanguagesBundle"),
.product(name: "SwiftTreeSitter", package: "SwiftTreeSitter"),
],
path: "Sources/Editors/Code/Languages",
resources: [
.copy("Resources/tree-sitter-c"),
.copy("Resources/tree-sitter-cpp"),
.copy("Resources/tree-sitter-galah"),
.copy("Resources/tree-sitter-jsdoc"),
.copy("Resources/tree-sitter-json"),
.copy("Resources/tree-sitter-python"),
.copy("Resources/tree-sitter-rust"),
.copy("Resources/tree-sitter-swift"),
.copy("Resources/tree-sitter-toml"),
.copy("Resources/tree-sitter-usd"),
]
),
.testTarget(
name: "CodeEditorTests",
dependencies: [
.target(name: "CosmoEditor"),
.target(name: "CodeLanguages"),
],
path: "Tests/Editors/Code"
),
],
cxxLanguageStandard: .cxx17
)