Skip to content

Commit b9050d6

Browse files
committed
Add Swift Package Manager support
1 parent 1f0b612 commit b9050d6

File tree

6 files changed

+1323
-23
lines changed

6 files changed

+1323
-23
lines changed

.gitignore

+5-1
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,8 @@ fastlane/test_output
6262
# After new code Injection tools there's a generated folder /iOSInjectionProject
6363
# https://github.com/johnno1962/injectionforxcode
6464

65-
iOSInjectionProject/
65+
iOSInjectionProject/
66+
67+
# SwiftPM
68+
.swiftpm
69+
.build

Package.resolved

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"object": {
3+
"pins": [
4+
{
5+
"package": "libde265",
6+
"repositoryURL": "https://github.com/SDWebImage/libde265-Xcode.git",
7+
"state": {
8+
"branch": null,
9+
"revision": "39b0430c631669dba8e578a2ececae3a05dbb935",
10+
"version": "1.0.4"
11+
}
12+
}
13+
]
14+
},
15+
"version": 1
16+
}

Package.swift

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// swift-tools-version:5.0
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "libheif",
8+
products: [
9+
// Products define the executables and libraries produced by a package, and make them visible to other packages.
10+
.library(
11+
name: "libheif",
12+
targets: ["libheif"]),
13+
],
14+
dependencies: [
15+
// Dependencies declare other packages that this package depends on.
16+
.package(url: "https://github.com/SDWebImage/libde265-Xcode.git", from: "1.0.4")
17+
],
18+
targets: [
19+
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
20+
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
21+
.target(
22+
name: "libheif",
23+
dependencies: ["libde265"],
24+
path: ".",
25+
exclude: ["libheif/libheif/box_fuzzer.cc", "libheif/libheif/color_conversion_fuzzer.cc", "libheif/libheif/encoder_fuzzer.cc", "libheif/libheif/file_fuzzer.cc", "libheif/libheif/heif_encoder_x265.h", "libheif/libheif/heif_encoder_x265.cc"],
26+
sources: ["libheif/libheif"],
27+
publicHeadersPath: "include",
28+
cSettings: [.define("HAVE_UNISTD_H"), .define("HAVE_LIBDE265")]
29+
)
30+
],
31+
cLanguageStandard: .gnu11,
32+
cxxLanguageStandard: .gnucxx14
33+
)

0 commit comments

Comments
 (0)