Skip to content

Commit 2e9be69

Browse files
committed
Fixing build - need to support all CocoaPods + Carthage imports, and apparently the previous format did not work properly, even though the result of has_include is correct, the compiler still sees the libwebp reference, so changed the order
1 parent 27d6b50 commit 2e9be69

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

Example/SDWebImageWebPCoderExample.xcodeproj/project.pbxproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
0358F0904AE0B377A509E317 /* Pods_SDImageWebPCoderExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08D062B84105453A729B2E18 /* Pods_SDImageWebPCoderExample.framework */; };
1110
803D79D3213597CB00C815FC /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 803D79D2213597CB00C815FC /* AppDelegate.m */; };
1211
803D79D6213597CB00C815FC /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 803D79D5213597CB00C815FC /* ViewController.m */; };
1312
803D79D9213597CB00C815FC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 803D79D7213597CB00C815FC /* Main.storyboard */; };
@@ -41,7 +40,6 @@
4140
isa = PBXFrameworksBuildPhase;
4241
buildActionMask = 2147483647;
4342
files = (
44-
0358F0904AE0B377A509E317 /* Pods_SDImageWebPCoderExample.framework in Frameworks */,
4543
C04477BE8FEEDC78E0968915 /* Pods_SDWebImageWebPCoderExample.framework in Frameworks */,
4644
);
4745
runOnlyForDeploymentPostprocessing = 0;

Example/SDWebImageWebPCoderExample/ViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88

99
#import "ViewController.h"
10-
#import <SDImageWebPCoder/SDImageWebPCoder.h>
10+
#import <SDWebImageWebPCoder/SDImageWebPCoder.h>
1111
#import <SDWebImage/SDWebImage.h>
1212

1313
@interface ViewController ()

SDWebImageWebPCoder/Classes/SDImageWebPCoder.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616
#import <SDWebImage/UIImage+Metadata.h>
1717
#import <SDWebImage/UIImage+ForceDecode.h>
1818

19-
#if __has_include(<libwebp/decode.h>) && __has_include(<libwebp/encode.h>) && __has_include(<libwebp/demux.h>) && __has_include(<libwebp/mux.h>)
20-
#import <libwebp/decode.h>
21-
#import <libwebp/encode.h>
22-
#import <libwebp/demux.h>
23-
#import <libwebp/mux.h>
24-
#else
19+
#if __has_include("webp/decode.h") && __has_include("webp/encode.h") && __has_include("webp/demux.h") && __has_include("webp/mux.h")
2520
#import "webp/decode.h"
2621
#import "webp/encode.h"
2722
#import "webp/demux.h"
2823
#import "webp/mux.h"
24+
#elif __has_include(<libwebp/decode.h>) && __has_include(<libwebp/encode.h>) && __has_include(<libwebp/demux.h>) && __has_include(<libwebp/mux.h>)
25+
#import <libwebp/decode.h>
26+
#import <libwebp/encode.h>
27+
#import <libwebp/demux.h>
28+
#import <libwebp/mux.h>
2929
#endif
3030

3131
#import <Accelerate/Accelerate.h>

0 commit comments

Comments
 (0)