luminate-old/Package.swift

122 lines
4.5 KiB
Swift

import CompilerPluginSupport
// swift-tools-version: 6.0
import PackageDescription
let package = Package(
name: "Luminate",
platforms: [.macOS(.v15)],
dependencies: [
.package(url: "https://git.aparoksha.dev/aparoksha/adwaita-swift", branch: "main"),
.package(url: "https://git.aparoksha.dev/aparoksha/localized", branch: "main"),
.package(url: "https://github.com/apple/swift-openapi-generator", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-openapi-urlsession", from: "1.0.0"),
.package(url: "https://github.com/stephencelis/SQLite.swift", from: "0.16.0"),
.package(url: "https://github.com/apple/swift-syntax", from: "603.0.0"),
.package(url: "https://github.com/apple/swift-log", from: "1.6.0"),
],
targets: [
.target(
name: "LuminateAPI",
dependencies: [
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession"),
],
plugins: [
.plugin(name: "OpenAPIGenerator", package: "swift-openapi-generator")
]
),
.target(
name: "LuminateCore",
dependencies: [
"LuminateAPI",
"LuminateObservationMacros",
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession"),
.product(name: "Logging", package: "swift-log"),
.product(name: "SQLite", package: "SQLite.swift"),
]
),
.macro(
name: "LuminateObservationMacros",
dependencies: [
.product(name: "SwiftSyntax", package: "swift-syntax"),
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
.product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
]
),
.target(
name: "LuminateDI",
dependencies: [
"LuminateCore",
.product(name: "Adwaita", package: "adwaita-swift"),
.product(name: "Logging", package: "swift-log"),
]
),
.target(
name: "CModules",
dependencies: [
.product(name: "CAdw", package: "adwaita-swift")
],
cSettings: [
.headerSearchPath("include"),
.unsafeFlags(["-I/opt/homebrew/include"], .when(platforms: [.macOS])),
],
linkerSettings: [
.unsafeFlags(["-L/opt/homebrew/lib"], .when(platforms: [.macOS])),
.linkedLibrary("mpv"),
.linkedLibrary("epoxy"),
]
),
.target(
name: "LuminateUI",
dependencies: [
"CModules",
"LuminateCore",
"LuminateDI",
"LuminateObservationMacros",
.product(name: "Adwaita", package: "adwaita-swift"),
]
),
.target(
name: "LuminatePlayer",
dependencies: [
"CModules",
"LuminateCore",
"LuminateDI",
"LuminateUI",
"LuminateObservationMacros",
.product(name: "Adwaita", package: "adwaita-swift"),
]
),
.executableTarget(
name: "Luminate",
dependencies: [
"LuminatePlayer",
"LuminateUI",
"LuminateDI",
"LuminateObservationMacros",
.product(name: "Adwaita", package: "adwaita-swift"),
.product(name: "Localized", package: "localized"),
.product(name: "Logging", package: "swift-log"),
],
path: "Sources/Luminate",
resources: [.process("Localized.yml")],
plugins: [.plugin(name: "GenerateLocalized", package: "localized")]
),
.testTarget(
name: "LuminateTests",
dependencies: [
"CModules",
"LuminateCore",
.product(name: "CAdw", package: "adwaita-swift"),
.product(name: "Adwaita", package: "adwaita-swift"),
],
),
],
swiftLanguageModes: [.v5]
)