-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPackage.swift
More file actions
63 lines (61 loc) · 2.56 KB
/
Copy pathPackage.swift
File metadata and controls
63 lines (61 loc) · 2.56 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// swift-tools-version: 5.10
import PackageDescription
import Foundation
// Use the local PipelineHelpers sibling when building from the umbrella monorepo;
// fall back to GitHub when used standalone.
let pipelineHelpersDep: Package.Dependency = FileManager.default.fileExists(
atPath: "../PipelineHelpers/Package.swift"
) ? .package(path: "../PipelineHelpers")
: .package(url: "https://github.com/dsward2/PipelineHelpers", branch: "main")
let package = Package(
name: "LiveAudioServer",
platforms: [
// Bumped from .v13: PipelineHelpers (AudioEncoders' package) requires
// macOS 14 package-wide, for PipelineRunner's use of @Observable —
// SwiftPM's platforms list is package-level, so any product from that
// package carries the same floor regardless of what it itself uses.
.macOS(.v14)
],
products: [
// Public library product so external SwiftPM packages (e.g. a SwiftUI
// host app) can `.package(url: …)` this repo and consume the server
// in-process. The CLI binary continues to exist as a separate
// executable product.
.library(name: "LiveAudioServerCore", targets: ["LiveAudioServerCore"]),
.executable(name: "LiveAudioServer", targets: ["LiveAudioServer"])
],
dependencies: [
.package(url: "https://github.com/apple/swift-testing.git", from: "0.10.0"),
// MP3/AAC encoding (AudioEncoders) — see scripts/build-mp3lame-xcframework.sh
// for why this package no longer vendors its own libmp3lame copy.
pipelineHelpersDep,
],
targets: [
// Server + encoders + streaming + config. Reusable from a host app.
.target(
name: "LiveAudioServerCore",
dependencies: [.product(name: "AudioEncoders", package: "PipelineHelpers")],
path: "Sources/LiveAudioServerCore"
),
// Thin CLI shim: argument parsing, signal handling, process exit.
.executableTarget(
name: "LiveAudioServer",
dependencies: ["LiveAudioServerCore"],
path: "Sources/LiveAudioServer",
linkerSettings: [
.unsafeFlags([
"-Xlinker", "-rpath",
"-Xlinker", "@executable_path/../Frameworks"
])
]
),
.testTarget(
name: "LiveAudioServerTests",
dependencies: [
"LiveAudioServerCore",
.product(name: "Testing", package: "swift-testing")
],
path: "Tests/LiveAudioServerTests"
)
]
)