File tree Expand file tree Collapse file tree 3 files changed +66
-1
lines changed Expand file tree Collapse file tree 3 files changed +66
-1
lines changed Original file line number Diff line number Diff line change @@ -63,4 +63,8 @@ fastlane/test_output
63
63
# After new code Injection tools there's a generated folder /iOSInjectionProject
64
64
# https://github.com/johnno1962/injectionforxcode
65
65
66
- iOSInjectionProject /
66
+ iOSInjectionProject /
67
+
68
+ # SwiftPM
69
+ .build
70
+ .swiftpm
Original file line number Diff line number Diff line change
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: " libwebp " ,
8
+ products: [
9
+ // Products define the executables and libraries produced by a package, and make them visible to other packages.
10
+ . library(
11
+ name: " libwebp " ,
12
+ targets: [ " libwebp " ] ) ,
13
+ ] ,
14
+ dependencies: [
15
+ // Dependencies declare other packages that this package depends on.
16
+ // .package(url: /* package url */, from: "1.0.0"),
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: " libwebp " ,
23
+ dependencies: [ ] ,
24
+ path: " libwebp/src " ,
25
+ publicHeadersPath: " webp " ,
26
+ cSettings: [ . headerSearchPath( " ../ " ) ] )
27
+ ]
28
+ )
Original file line number Diff line number Diff line change 2
2
3
3
A wrapper for [ libwebp] ( https://github.com/webmproject/libwebp ) + Xcode project.
4
4
This enables Carthage support
5
+ This also contains the Swift Package Manager support
5
6
6
7
[ ![ CI Status] ( http://img.shields.io/travis/SDWebImage/libwebp-Xcode.svg?style=flat )] ( https://travis-ci.org/SDWebImage/libwebp-Xcode )
7
8
[ ![ Carthage compatible] ( https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat )] ( https://github.com/SDWebImage/libwebp-Xcode )
9
+ [ ![ SwiftPM compatible] ( https://img.shields.io/badge/SwiftPM-compatible-brightgreen.svg )] ( https://swift.org/package-manager/ )
8
10
9
11
## Requirements
10
12
@@ -15,16 +17,47 @@ This enables Carthage support
15
17
16
18
## Installation
17
19
20
+ ### Carthage
21
+
18
22
libwebp is (via this repo) available through [ Carthage] ( https://github.com/Carthage/Carthage ) .
19
23
20
24
```
21
25
github "SDWebImage/libwebp-Xcode"
22
26
```
23
27
28
+ ### SwiftPM
29
+
30
+ Libwebp is available through [ Swift Package Manager] ( https://img.shields.io/badge/SwiftPM-compatible-brightgreen.svg ) .
31
+
32
+ ```
33
+ let package = Package(
34
+ dependencies: [
35
+ .package(url: "https://github.com/SDWebImage/libwebp-Xcode", from: "1.0.4")
36
+ ],
37
+ // ...
38
+ )
39
+ ```
40
+
24
41
## Usage
25
42
26
43
Use libwebp as you would normally, this is just a repo that adds an Xcode proj.
27
44
45
+ For Swift Package Manager user, use the modular import instead of C headers.
46
+
47
+ + Objective-C
48
+
49
+ ``` objective-c
50
+ @import libwebp;
51
+ ```
52
+
53
+ + Swift
54
+
55
+ ``` swift
56
+ import libwebp
57
+ ```
58
+
28
59
## License
29
60
30
61
libwebp is available under the BSD-3 license. See [ the LICENSE file] ( https://github.com/webmproject/libwebp/blob/master/COPYING ) for more info.
62
+
63
+
You can’t perform that action at this time.
0 commit comments