42 lines
1.5 KiB
Swift
42 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: "ArtifactPlatform",
|
|
platforms: [.macOS(.v14)],
|
|
products: [
|
|
// Products define the executables and libraries a package produces, making them visible to other packages.
|
|
.library(
|
|
name: "ArtifactPlatform",
|
|
targets: ["ArtifactPlatform"]
|
|
),
|
|
],
|
|
traits: [
|
|
.default(enabledTraits: ["GLFW"]),
|
|
.trait(name: "GLFW", description: "Enables the builtin GLFW backend."),
|
|
.trait(name: "SDL3", description: "Enables the builtin SDL3 backend."),
|
|
],
|
|
dependencies: [
|
|
.package(path: "../GLFW"),
|
|
.package(path: "../SDL3"),
|
|
.package(path: "../ArtifactMath"),
|
|
],
|
|
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: "ArtifactPlatform",
|
|
dependencies: [
|
|
"ArtifactMath",
|
|
.product(name: "GLFW", package: "GLFW", condition: .when(traits: ["GLFW"])),
|
|
.product(name: "SDL3", package: "SDL3", condition: .when(traits: ["SDL3"])),
|
|
]
|
|
),
|
|
.testTarget(
|
|
name: "ArtifactPlatformTests",
|
|
dependencies: ["ArtifactPlatform"],
|
|
),
|
|
],
|
|
)
|