|
1 | | -// swift-tools-version:5.1 |
| 1 | +// swift-tools-version:5.3 |
2 | 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. |
3 | 3 |
|
4 | 4 | import PackageDescription |
5 | 5 |
|
6 | 6 | let package = Package( |
7 | | - name: "SwiftFFmpeg", |
8 | | - products: [ |
9 | | - .library( |
10 | | - name: "SwiftFFmpeg", |
11 | | - targets: ["SwiftFFmpeg"] |
12 | | - ) |
13 | | - ], |
14 | | - targets: [ |
15 | | - .target( |
16 | | - name: "CFFmpeg", |
17 | | - dependencies: [], |
18 | | - linkerSettings: [ |
19 | | - LinkerSetting.unsafeFlags(["-Llibs/ffmpeg"]) |
20 | | - ] |
21 | | - ), |
22 | | - .target( |
23 | | - name: "SwiftFFmpeg", |
24 | | - dependencies: ["CFFmpeg"] |
25 | | - ), |
26 | | - .target( |
27 | | - name: "SwiftFFmpegExamples", |
28 | | - dependencies: ["SwiftFFmpeg"], |
29 | | - path: "Sources/Examples" |
30 | | - ), |
31 | | - .testTarget( |
32 | | - name: "SwiftFFmpegTests", |
33 | | - dependencies: ["SwiftFFmpeg"] |
34 | | - ) |
35 | | - ] |
| 7 | + name: "SwiftFFmpeg", |
| 8 | + platforms: [.iOS(.v9), .macOS(.v10_10), .tvOS(.v10)], |
| 9 | + products: [ |
| 10 | + .library( |
| 11 | + name: "SwiftFFmpeg", |
| 12 | + targets: ["SwiftFFmpeg"] |
| 13 | + ) |
| 14 | + ], |
| 15 | + targets: [ |
| 16 | + .target( |
| 17 | + name: "SwiftFFmpeg", |
| 18 | + dependencies: ["CFFmpeg"] |
| 19 | + ), |
| 20 | + .target( |
| 21 | + name: "CFFmpeg", |
| 22 | + dependencies: [ |
| 23 | + "libavcodec", |
| 24 | + "libavdevice", |
| 25 | + "libavfilter", |
| 26 | + "libavformat", |
| 27 | + "libavutil", |
| 28 | + "libpostproc", |
| 29 | + "libswresample", |
| 30 | + "libswscale", |
| 31 | + ], |
| 32 | + linkerSettings: [ |
| 33 | + .linkedLibrary("z"), |
| 34 | + .linkedLibrary("bz2"), |
| 35 | + .linkedLibrary("iconv"), |
| 36 | + .linkedLibrary("lzma"), |
| 37 | + .linkedFramework("Security"), |
| 38 | + .linkedFramework("CoreMedia"), |
| 39 | + .linkedFramework("CoreVideo"), |
| 40 | + .linkedFramework("AudioToolbox"), |
| 41 | + .linkedFramework("VideoToolbox"), |
| 42 | + .linkedFramework("OpenGL"), |
| 43 | + .linkedFramework("CoreImage"), |
| 44 | + .linkedFramework("AppKit"), |
| 45 | + ] |
| 46 | + ), |
| 47 | + .binaryTarget( |
| 48 | + name: "libavcodec", |
| 49 | + url: "https://github.com/sunlubo/SwiftFFmpeg/blob/master/xcframework/libavcodec.zip?raw=true", |
| 50 | + checksum: "fd7134a138765bc9c80cc991e032a0229512c5bf0a18c151a9dcec4afa4fad0b" |
| 51 | + ), |
| 52 | + .binaryTarget( |
| 53 | + name: "libavdevice", |
| 54 | + url: |
| 55 | + "https://github.com/sunlubo/SwiftFFmpeg/blob/master/xcframework/libavdevice.zip?raw=true", |
| 56 | + checksum: "91787692e329cdf60a80d96a42022bc9bd94b42e5c0ba79537313132886e9091" |
| 57 | + ), |
| 58 | + .binaryTarget( |
| 59 | + name: "libavfilter", |
| 60 | + url: |
| 61 | + "https://github.com/sunlubo/SwiftFFmpeg/blob/master/xcframework/libavfilter.zip?raw=true", |
| 62 | + checksum: "8f87a588508ca40990905e0a6ce904ddc850ab2bc1069802f01e78a87fda8867" |
| 63 | + ), |
| 64 | + .binaryTarget( |
| 65 | + name: "libavformat", |
| 66 | + url: |
| 67 | + "https://github.com/sunlubo/SwiftFFmpeg/blob/master/xcframework/libavformat.zip?raw=true", |
| 68 | + checksum: "d22e1ebb8c4f1ffc4975c9f3effabea6cde30ebd74dcd8fd1f55fca33d25c0b6" |
| 69 | + ), |
| 70 | + .binaryTarget( |
| 71 | + name: "libavutil", |
| 72 | + url: "https://github.com/sunlubo/SwiftFFmpeg/blob/master/xcframework/libavutil.zip?raw=true", |
| 73 | + checksum: "46e9c2d1e78272ae349081c8a3f49a357224ef789a9fd954e4e6d3e662eeffd1" |
| 74 | + ), |
| 75 | + .binaryTarget( |
| 76 | + name: "libpostproc", |
| 77 | + url: |
| 78 | + "https://github.com/sunlubo/SwiftFFmpeg/blob/master/xcframework/libpostproc.zip?raw=true", |
| 79 | + checksum: "e1d3c5f4bef331a3bb0b57762b833faff851917733f42edbf25497983de037a9" |
| 80 | + ), |
| 81 | + .binaryTarget( |
| 82 | + name: "libswresample", |
| 83 | + url: |
| 84 | + "https://github.com/sunlubo/SwiftFFmpeg/blob/master/xcframework/libswresample.zip?raw=true", |
| 85 | + checksum: "b22f6e1754766dc9691755a9c17a800f63eb7299cba7649091bb26ad982b0c8c" |
| 86 | + ), |
| 87 | + .binaryTarget( |
| 88 | + name: "libswscale", |
| 89 | + url: "https://github.com/sunlubo/SwiftFFmpeg/blob/master/xcframework/libswscale.zip?raw=true", |
| 90 | + checksum: "a6b9201886e8aab5022b557cf0da2d8c5b1f085355d63f15665c4f48e9667a7b" |
| 91 | + ), |
| 92 | + .target( |
| 93 | + name: "SwiftFFmpegExamples", |
| 94 | + dependencies: ["SwiftFFmpeg"] |
| 95 | + ), |
| 96 | + .testTarget( |
| 97 | + name: "SwiftFFmpegTests", |
| 98 | + dependencies: ["SwiftFFmpeg"] |
| 99 | + ), |
| 100 | + ] |
36 | 101 | ) |
0 commit comments