forked from superuser404notfound/FFmpegBuild
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
72 lines (70 loc) · 2.8 KB
/
Copy pathPackage.swift
File metadata and controls
72 lines (70 loc) · 2.8 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
// swift-tools-version: 6.0
import PackageDescription
let package = Package(
name: "FFmpegBuild",
platforms: [
.iOS(.v16),
.tvOS(.v16),
.macOS(.v14),
.visionOS(.v1),
],
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"]),
.library(name: "Libavfilter", targets: ["Libavfilter"]),
.library(name: "Libzimg", targets: ["Libzimg"]),
.library(name: "Libzvbi", targets: ["Libzvbi"]),
],
targets: [
// Umbrella target that links all FFmpeg libraries + dav1d + system frameworks
.target(
name: "FFmpegBuild",
dependencies: [
"Libavcodec",
"Libavformat",
"Libavutil",
"Libswresample",
"Libswscale",
"Libavfilter",
"Libdav1d",
"Libzimg",
"Libzvbi",
],
path: "Sources/FFmpegBuild",
linkerSettings: [
.linkedFramework("AudioToolbox"),
.linkedFramework("CoreMedia"),
.linkedFramework("CoreVideo"),
.linkedFramework("VideoToolbox"),
.linkedLibrary("z"),
.linkedLibrary("bz2"),
.linkedLibrary("iconv"),
.linkedLibrary("c++"),
]
),
// 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"),
.binaryTarget(name: "Libavfilter", path: "Sources/Libavfilter.xcframework"),
.binaryTarget(name: "Libzimg", path: "Sources/Libzimg.xcframework"),
.binaryTarget(name: "Libzvbi", path: "Sources/Libzvbi.xcframework"),
.testTarget(
name: "FFmpegBuildTests",
dependencies: ["FFmpegBuild", "Libavfilter", "Libavutil"],
path: "Tests/FFmpegBuildTests"
),
]
)