-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
31 lines (28 loc) · 1.2 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
// swift-tools-version: 6.0
import PackageDescription
let releaseVersion = Context.environment["DARWIN_PRIVATE_FRAMEWORKS_TARGET_RELEASE"].flatMap { Int($0) } ?? 2024
let platforms: [SupportedPlatform] = switch releaseVersion {
case 2024: [.iOS(.v18), .macOS(.v15), .macCatalyst(.v18), .tvOS(.v18), .watchOS(.v10), .visionOS(.v2)]
case 2021: [.iOS(.v15), .macOS(.v12), .macCatalyst(.v15), .tvOS(.v15), .watchOS(.v7)]
default: []
}
let package = Package(
name: "DarwinPrivateFrameworks",
platforms: platforms,
products: [
.library(name: "AttributeGraph", targets: ["AttributeGraph"]),
.library(name: "RenderBox", targets: ["RenderBox"]),
],
targets: [
.binaryTarget(name: "AttributeGraph", path: "AG/\(releaseVersion)/AttributeGraph.xcframework"),
.binaryTarget(name: "RenderBox", path: "RB/2024/RenderBox.xcframework"),
.plugin(
name: "UpdateXCFrameworks",
capability: .command(
intent: .custom(verb: "update-xcframeworks", description: "Update xcframeworks"),
permissions: [.writeToPackageDirectory(reason: "Update xcframeworks")]
)
),
],
cxxLanguageStandard: .cxx17
)