forked from ctreffs/SwiftSDL2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPackage.swift
32 lines (31 loc) · 1013 Bytes
/
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
// swift-tools-version:5.5
import PackageDescription
let package = Package(
name: "SDL2",
products: [
.library(name: "SDL2",
targets: ["SDL2"]),
.executable(name: "MinimalApp",
targets: ["Minimal"]),
.executable(name: "MetalApp",
targets: ["MetalApp"])
],
targets: [
.systemLibrary(
name: "CSDL2",
pkgConfig: "sdl2",
providers: [
.brew(["sdl2"]),
.apt(["libsdl2-dev"])
]),
.target(name: "SDL2", dependencies: ["CSDL2"]),
.executableTarget(name: "Minimal", dependencies: ["SDL2"], path: "Sources/Demos/Minimal"),
.executableTarget(
name: "MetalApp",
dependencies: ["SDL2"],
path: "Sources/Demos/MetalApp",
swiftSettings: [.define("METAL_ENABLED", .when(platforms: [.macOS]))]
),
.testTarget(name: "CSDL2Tests", dependencies: ["CSDL2"])
]
)