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