-
Notifications
You must be signed in to change notification settings - Fork 86
/
Package.swift
111 lines (105 loc) · 4.3 KB
/
Package.swift
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// swift-tools-version: 5.6
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "SFBAudioEngine",
platforms: [
.macOS(.v11),
.iOS(.v15),
.tvOS(.v15),
],
products: [
.library(
name: "SFBAudioEngine",
targets: [
"CSFBAudioEngine",
"SFBAudioEngine",
]),
],
dependencies: [
.package(url: "https://github.com/sbooth/CXXAudioUtilities", from: "0.1.2"),
.package(url: "https://github.com/sbooth/AVFAudioExtensions", from: "0.1.3"),
// Standalone dependencies from source
.package(url: "https://github.com/sbooth/CDUMB", from: "2.0.3"),
.package(url: "https://github.com/sbooth/CXXMonkeysAudio", from: "10.76.0"),
.package(url: "https://github.com/sbooth/CXXTagLib", from: "2.0.2"),
// Standalone dependencies not easily packaged using SPM
.package(url: "https://github.com/sbooth/wavpack-binary-xcframework", from: "0.1.1"),
// Xiph ecosystem
.package(url: "https://github.com/sbooth/ogg-binary-xcframework", from: "0.1.2"),
// flac-binary-xcframework requires ogg-binary-xcframework
.package(url: "https://github.com/sbooth/flac-binary-xcframework", from: "0.1.3"),
// opus-binary-xcframework requires ogg-binary-xcframework
.package(url: "https://github.com/sbooth/opus-binary-xcframework", from: "0.2.2"),
// vorbis-binary-xcframework requires ogg-binary-xcframework
.package(url: "https://github.com/sbooth/vorbis-binary-xcframework", from: "0.1.2"),
// libspeex does not depend on libogg
.package(url: "https://github.com/sbooth/CSpeex", from: "1.2.1"),
// LGPL bits
.package(url: "https://github.com/sbooth/lame-binary-xcframework", from: "0.1.2"),
// Technically only the musepack *encoder* is LGPL'd but for now the decoder and encoder are packaged together
.package(url: "https://github.com/sbooth/mpc-binary-xcframework", from: "0.1.2"),
.package(url: "https://github.com/sbooth/mpg123-binary-xcframework", from: "0.2.2"),
// sndfile-binary-xcframework requires ogg-binary-xcframework, flac-binary-xcframework, opus-binary-xcframework, and vorbis-binary-xcframework
.package(url: "https://github.com/sbooth/sndfile-binary-xcframework", from: "0.1.2"),
.package(url: "https://github.com/sbooth/tta-cpp-binary-xcframework", from: "0.1.2"),
],
targets: [
.target(
name: "CSFBAudioEngine",
dependencies: [
.product(name: "CXXAudioUtilities", package: "CXXAudioUtilities"),
.product(name: "AVFAudioExtensions", package: "AVFAudioExtensions"),
// Standalone dependencies
.product(name: "dumb", package: "CDUMB"),
.product(name: "MAC", package: "CXXMonkeysAudio"),
.product(name: "taglib", package: "CXXTagLib"),
.product(name: "wavpack", package: "wavpack-binary-xcframework"),
// Xiph ecosystem
.product(name: "ogg", package: "ogg-binary-xcframework"),
.product(name: "FLAC", package: "flac-binary-xcframework"),
.product(name: "opus", package: "opus-binary-xcframework"),
.product(name: "vorbis", package: "vorbis-binary-xcframework"),
.product(name: "speex", package: "CSpeex"),
// LGPL bits
.product(name: "lame", package: "lame-binary-xcframework"),
.product(name: "mpc", package: "mpc-binary-xcframework"),
.product(name: "mpg123", package: "mpg123-binary-xcframework"),
.product(name: "sndfile", package: "sndfile-binary-xcframework"),
.product(name: "tta-cpp", package: "tta-cpp-binary-xcframework"),
],
cSettings: [
.headerSearchPath("include/SFBAudioEngine"),
.headerSearchPath("Input"),
.headerSearchPath("Decoders"),
.headerSearchPath("Player"),
.headerSearchPath("Output"),
.headerSearchPath("Encoders"),
.headerSearchPath("Utilities"),
.headerSearchPath("Analysis"),
.headerSearchPath("Metadata"),
.headerSearchPath("Conversion"),
],
linkerSettings: [
.linkedFramework("Accelerate"),
.linkedFramework("AudioToolbox"),
.linkedFramework("AVFAudio"),
// .linkedFramework("CoreAudioTypes"),
.linkedFramework("Foundation"),
.linkedFramework("ImageIO"),
.linkedFramework("UniformTypeIdentifiers"),
]),
.target(
name: "SFBAudioEngine",
dependencies: [
"CSFBAudioEngine",
]),
.testTarget(
name: "SFBAudioEngineTests",
dependencies: [
"SFBAudioEngine",
])
],
cLanguageStandard: .c11,
cxxLanguageStandard: .cxx17
)