43 lines
1.5 KiB
Swift
43 lines
1.5 KiB
Swift
// swift-tools-version: 6.1
|
|
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
|
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "ArtifactGraphics",
|
|
platforms: [.macOS(.v14)],
|
|
products: [
|
|
// Products define the executables and libraries a package produces, making them visible to other packages.
|
|
.library(
|
|
name: "ArtifactGraphics",
|
|
targets: ["ArtifactGraphics"]
|
|
),
|
|
],
|
|
traits: [
|
|
.default(enabledTraits: ["WebGPU"]),
|
|
.trait(name: "WebGPU", description: "Enables the builtin WebGPU backend.")
|
|
],
|
|
dependencies: [
|
|
.package(path: "../ArtifactPlatform"),
|
|
.package(path: "../ArtifactColor"),
|
|
.package(path: "../ArtifactMath"),
|
|
.package(path: "../WGPUNative"),
|
|
],
|
|
targets: [
|
|
// Targets are the basic building blocks of a package, defining a module or a test suite.
|
|
// Targets can depend on other targets in this package and products from dependencies.
|
|
.target(
|
|
name: "ArtifactGraphics",
|
|
dependencies: [
|
|
"ArtifactColor",
|
|
"ArtifactPlatform",
|
|
"ArtifactMath",
|
|
.product(name: "WGPUNative", package: "WGPUNative", condition: .when(traits: ["WebGPU"])),
|
|
],
|
|
),
|
|
.testTarget(
|
|
name: "ArtifactGraphicsTests",
|
|
dependencies: ["ArtifactGraphics"]
|
|
),
|
|
]
|
|
)
|