-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Package.swift
40 lines (39 loc) · 1.24 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
// swift-tools-version:5.6
import PackageDescription
let package = Package(
name: "SDL",
platforms: [
.macOS(.v11),
.iOS(.v13),
.tvOS(.v13),
],
products: [
.library(name: "SDL",
targets: ["SDL"]),
],
targets: [
.target(name: "SDL",
dependencies: [
.target(name: "SDL2", condition: .when(platforms: [.macOS, .iOS, .tvOS])),
.target(name: "CSDL2", condition: .when(platforms: [.linux, .windows])),
],
path: "Sources/SDL2"),
.testTarget(name: "SDLTests", dependencies: ["SDL"]),
.binaryTarget(name: "SDL2", path: "SDL2.xcframework"),
.systemLibrary(
name: "CSDL2",
pkgConfig: "sdl2",
providers: [
.apt(["libsdl2-dev"]),
// ,.vcpkg(["sdl2[core,vulkan]"])
]
),
.executableTarget(name: "Minimal", dependencies: ["SDL"], path: "Sources/Demos/Minimal"),
.executableTarget(
name: "MetalApp",
dependencies: ["SDL"],
path: "Sources/Demos/MetalApp",
swiftSettings: [.define("METAL_ENABLED", .when(platforms: [.macOS]))]
),
]
)