Merge pull request #472 from ikesyo/webp-subspec

Use 'default_subspec' and separate the WebP support to its sub-spec
This commit is contained in:
Olivier Poitrey 2013-08-14 08:48:41 -07:00
commit a0df1a0dc2
1 changed files with 14 additions and 3 deletions

View File

@ -17,14 +17,25 @@ Pod::Spec.new do |s|
'and performances!'
s.requires_arc = true
s.source_files = 'SDWebImage/{NS,SD,UI}*.{h,m}'
s.framework = 'ImageIO'
s.default_subspec = 'Core'
s.dependency 'libwebp'
s.subspec 'Core' do |core|
core.source_files = 'SDWebImage/{NS,SD,UI}*.{h,m}'
core.exclude_files = 'SDWebImage/UIImage+WebP.{h,m}'
end
# TODO currently CocoaPods always tries to install the subspec even if the dependency is on just 'SDWebImage'
s.subspec 'MapKit' do |mk|
mk.source_files = 'SDWebImage/MKAnnotationView+WebCache.*'
mk.framework = 'MapKit'
mk.dependency 'SDWebImage/Core'
end
s.subspec 'WebP' do |webp|
webp.source_files = 'SDWebImage/UIImage+WebP.{h,m}'
webp.xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) SD_WEBP=1' }
webp.dependency 'SDWebImage/Core'
webp.dependency 'libwebp'
end
end