-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPackage.swift
More file actions
94 lines (91 loc) · 3.54 KB
/
Package.swift
File metadata and controls
94 lines (91 loc) · 3.54 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
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
// swift-tools-version: 6.3
import PackageDescription
let package = Package(
name: "SwiftVLC",
platforms: [.iOS(.v18), .macOS(.v15), .tvOS(.v18), .macCatalyst(.v18)],
products: [
.library(name: "SwiftVLC", targets: ["SwiftVLC"])
],
dependencies: [
// Build-time plugin only; not linked into consumers.
.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.4.6"),
// Test-only. Produces diff-style failure messages for struct/enum
// comparisons, replacing Swift Testing's "true vs false" default.
.package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "1.3.3")
],
targets: [
.binaryTarget(
name: "libvlc",
url: "https://github.com/harflabs/SwiftVLC/releases/download/v0.7.1/libvlc.xcframework.zip",
checksum: "36fcad9c496c76aa481f3ab9c46e58a4252a9a13c5d736b8cca20846be60d66d"
),
.target(
name: "CLibVLC",
dependencies: ["libvlc"],
publicHeadersPath: "include",
linkerSettings: [
// System frameworks required by libVLC
.linkedFramework("AudioToolbox"),
.linkedFramework("AudioUnit", .when(platforms: [.macOS])),
.linkedFramework("AVFoundation"),
.linkedFramework("AVKit"),
.linkedFramework("CoreAudio"),
.linkedFramework("CoreFoundation"),
.linkedFramework("CoreGraphics"),
.linkedFramework("CoreImage"),
.linkedFramework("CoreMedia"),
.linkedFramework("CoreServices"),
.linkedFramework("CoreText"),
.linkedFramework("CoreVideo"),
.linkedFramework("Foundation"),
.linkedFramework("IOKit", .when(platforms: [.macOS])),
.linkedFramework("IOSurface"),
.linkedFramework("OpenGL", .when(platforms: [.macOS])),
.linkedFramework("OpenGLES", .when(platforms: [.iOS, .tvOS])),
.linkedFramework("QuartzCore"),
.linkedFramework("Security"),
.linkedFramework("SystemConfiguration"),
.linkedFramework("VideoToolbox"),
// System libraries required by libVLC and its contribs
.linkedLibrary("bz2"),
.linkedLibrary("c++"),
.linkedLibrary("iconv"),
.linkedLibrary("resolv"),
.linkedLibrary("sqlite3"),
.linkedLibrary("xml2"),
.linkedLibrary("z")
]
),
.target(
name: "SwiftVLC",
dependencies: ["CLibVLC"],
swiftSettings: [
.swiftLanguageMode(.v6),
// Upcoming features that become default in Swift 7 — opt-in early
// to keep the codebase forward-compatible and catch issues now.
.enableUpcomingFeature("NonisolatedNonsendingByDefault"), // SE-0461
.enableUpcomingFeature("MemberImportVisibility"), // SE-0444
.enableUpcomingFeature("InferIsolatedConformances"), // SE-0449
.enableUpcomingFeature("ImmutableWeakCaptures"), // SE-0481
// Experimental: @_lifetime(borrow …) for ~Escapable overlays
// (Marquee / Logo / VideoAdjustments).
.enableExperimentalFeature("Lifetimes")
]
),
.testTarget(
name: "SwiftVLCTests",
// CLibVLC is available transitively through SwiftVLC — re-linking it
// here causes "Class X is implemented in both A and B" runtime warnings
// when a test binary ends up with two copies of the same symbol graph.
dependencies: [
"SwiftVLC",
.product(name: "CustomDump", package: "swift-custom-dump")
],
resources: [.copy("Fixtures")],
swiftSettings: [
.swiftLanguageMode(.v6),
.enableUpcomingFeature("MemberImportVisibility")
]
)
]
)