Files
Lyrebird/Demos/LyrebirdGUIDemo/Package.swift
T

49 lines
1.7 KiB
Swift

// Package.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
// swift-tools-version: 6.0
import PackageDescription
// A single cross-platform GUI demo: one shared library of synths + views, and a
// thin executable entry point that bootstraps the native toolkit per platform —
// AppKit/SwiftUI on macOS, GTK4/SwiftOpenUI on Linux. The view bodies are written
// to the subset of the View DSL that both backends share, so the UI is one source.
//
// macOS: swift run LyrebirdGUIDemo (or open the thin Xcode project)
// Linux: swift run LyrebirdGUIDemo (needs libgtk-4-dev + libasound2-dev)
//
// Select the synth with LYREBIRD_DEMO=vector (default), sine, or conductor.
let package = Package(
name: "LyrebirdGUIDemo",
platforms: [.macOS(.v15)],
products: [
.library(name: "LyrebirdGUIDemoKit", targets: ["LyrebirdGUIDemoKit"]),
.executable(name: "LyrebirdGUIDemo", targets: ["LyrebirdGUIDemo"]),
],
dependencies: [
.package(path: "../.."),
],
targets: [
.target(
name: "LyrebirdGUIDemoKit",
dependencies: [
.product(name: "Lyrebird", package: "Lyrebird"),
.product(name: "LyrebirdUI", package: "Lyrebird"),
],
path: "Sources/LyrebirdGUIDemoKit"
),
.executableTarget(
name: "LyrebirdGUIDemo",
dependencies: [
"LyrebirdGUIDemoKit",
.product(name: "Lyrebird", package: "Lyrebird"),
.product(name: "LyrebirdUI", package: "Lyrebird"),
],
path: "Sources/LyrebirdGUIDemo"
),
]
)