-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPackage.swift
More file actions
56 lines (54 loc) · 2.07 KB
/
Package.swift
File metadata and controls
56 lines (54 loc) · 2.07 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
// swift-tools-version: 6.0
import PackageDescription
let package = Package(
name: "FFmpegBuild",
platforms: [
.iOS(.v16),
.tvOS(.v16),
.macOS(.v14),
],
products: [
.library(
name: "FFmpegBuild",
targets: ["FFmpegBuild"]
),
// Individual libraries for consumers that want fine-grained control
.library(name: "Libavcodec", targets: ["Libavcodec"]),
.library(name: "Libavformat", targets: ["Libavformat"]),
.library(name: "Libavutil", targets: ["Libavutil"]),
.library(name: "Libswresample", targets: ["Libswresample"]),
.library(name: "Libswscale", targets: ["Libswscale"]),
.library(name: "Libdav1d", targets: ["Libdav1d"]),
],
targets: [
// Umbrella target that links all FFmpeg libraries + dav1d + system frameworks
.target(
name: "FFmpegBuild",
dependencies: [
"Libavcodec",
"Libavformat",
"Libavutil",
"Libswresample",
"Libswscale",
"Libdav1d",
],
path: "Sources/FFmpegBuild",
linkerSettings: [
.linkedFramework("AudioToolbox"),
.linkedFramework("CoreMedia"),
.linkedFramework("CoreVideo"),
.linkedFramework("VideoToolbox"),
.linkedLibrary("z"),
.linkedLibrary("bz2"),
.linkedLibrary("iconv"),
]
),
// Prebuilt xcframeworks (created by build.sh)
.binaryTarget(name: "Libavcodec", path: "Sources/Libavcodec.xcframework"),
.binaryTarget(name: "Libavformat", path: "Sources/Libavformat.xcframework"),
.binaryTarget(name: "Libavutil", path: "Sources/Libavutil.xcframework"),
.binaryTarget(name: "Libswresample", path: "Sources/Libswresample.xcframework"),
.binaryTarget(name: "Libswscale", path: "Sources/Libswscale.xcframework"),
.binaryTarget(name: "Libdav1d", path: "Sources/Libdav1d.xcframework"),
]
)