-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
51 lines (48 loc) · 1.53 KB
/
Copy pathPackage.swift
File metadata and controls
51 lines (48 loc) · 1.53 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
// swift-tools-version: 5.9
import PackageDescription
import Foundation
var packageTargets: [Target] = [
.target(
name: "SystemAudioBridgeC",
path: "Sources/SystemAudioBridgeC",
publicHeadersPath: "include",
linkerSettings: [
.linkedFramework("CoreAudio"),
.linkedFramework("CoreFoundation")
]
),
.executableTarget(
name: "CamiTune",
dependencies: ["SystemAudioBridgeC"],
path: "Sources/CamiTune",
resources: [
.copy("icon.png"),
.copy("DeviceCorrectionTargets"),
.copy("SpatialAssets")
]
)
]
// Test sources stay local. Clean GitHub checkouts build without the ignored
// Tests directory; opt in to the suites available in this working copy.
if ProcessInfo.processInfo.environment["CAMITUNE_LOCAL_TESTS"] == "1" {
let packageRoot = URL(fileURLWithPath: #filePath).deletingLastPathComponent()
for name in ["MultichannelTests", "CamiTuneTests"] {
let path = "Tests/\(name)"
guard FileManager.default.fileExists(atPath: packageRoot.appendingPathComponent(path).path) else { continue }
packageTargets.append(
.testTarget(
name: name,
dependencies: ["CamiTune", "SystemAudioBridgeC"],
path: path
)
)
}
}
let package = Package(
name: "CamiTune",
platforms: [.macOS(.v13)],
products: [
.executable(name: "CamiTune", targets: ["CamiTune"])
],
targets: packageTargets
)