40 lines
1.1 KiB
Swift
40 lines
1.1 KiB
Swift
// swift-tools-version: 5.9
|
|
import Foundation
|
|
import PackageDescription
|
|
|
|
let raylibPrefix = ProcessInfo.processInfo.environment["RAYLIB_PREFIX"] ?? "/opt/homebrew"
|
|
|
|
let package = Package(
|
|
name: "OGSBlue",
|
|
platforms: [
|
|
.macOS(.v13)
|
|
],
|
|
targets: [
|
|
.target(
|
|
name: "RaylibBridge",
|
|
path: "src",
|
|
sources: ["Blue.c"],
|
|
publicHeadersPath: "raybri",
|
|
cSettings: [
|
|
.headerSearchPath("raybri"),
|
|
.unsafeFlags(["-I", "\(raylibPrefix)/include"])
|
|
]
|
|
),
|
|
.executableTarget(
|
|
name: "ogs-blue",
|
|
dependencies: ["RaylibBridge"],
|
|
path: "src",
|
|
exclude: ["raybri", "Blue.c"],
|
|
swiftSettings: [
|
|
.unsafeFlags(["-Xcc", "-DGL_SILENCE_DEPRECATION", "-Xcc", "-I\(raylibPrefix)/include"])
|
|
],
|
|
linkerSettings: [
|
|
.unsafeFlags([
|
|
"-L", "\(raylibPrefix)/lib",
|
|
"-lraylib"
|
|
])
|
|
]
|
|
)
|
|
]
|
|
)
|