Fixes webp integration for CocoaPods > 1.0. Thanks to SDWebImage for the solution and @yxztj to pointing it out! (#226)

This commit is contained in:
Garrett Moon
2016-08-05 13:13:42 -07:00
committed by GitHub
parent 03d7d40ab4
commit 83fe96270b
3 changed files with 4 additions and 7 deletions

View File

@@ -11,8 +11,6 @@ env:
- OS='latest' name='iPhone 6'
before_install:
- gem uninstall cocoapods --version '>0.39.0'
- gem install cocoapods -v '0.39.0'
- gem install xcpretty
before_script:
- pod --version

View File

@@ -62,7 +62,10 @@ Pod::Spec.new do |s|
end
s.subspec 'WebP' do |webp|
webp.xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) PIN_WEBP=1' }
webp.xcconfig = {
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) PIN_WEBP=1',
'USER_HEADER_SEARCH_PATHS' => '$(inherited) $(SRCROOT)/libwebp/src'
}
webp.dependency 'PINRemoteImage/Core'
webp.dependency 'libwebp'
end

View File

@@ -9,11 +9,7 @@
#import "PINImage+WebP.h"
#ifdef PIN_WEBP
#if !COCOAPODS
#import "webp/decode.h"
#else
#import "libwebp/webp/decode.h"
#endif
static void releaseData(void *info, const void *data, size_t size)
{