update podspec to support all 4 standalone components, including `enc`, `dec`, `demux` and `mux`, all of these subspecs can be compiled without extra dependency
This commit is contained in:
parent
32e2e9019c
commit
54129f7adb
|
@ -19,9 +19,42 @@ Pod::Spec.new do |s|
|
|||
'USER_HEADER_SEARCH_PATHS' => '$(inherited) ${PODS_ROOT}/libwebp/ ${PODS_TARGET_SRCROOT}/'
|
||||
}
|
||||
s.preserve_path = 'src'
|
||||
s.default_subspecs = 'dec', 'enc', 'demux', 'mux'
|
||||
|
||||
s.source_files = 'src/webp/*.{h,c}', 'src/utils/*.{h,c}', 'src/dsp/*.{h,c}', 'src/enc/*.{h,c}', 'src/dec/*.{h,c}', 'src/demux/*.{h,c}', 'src/mux/*.{h,c}'
|
||||
s.public_header_files = 'src/webp/*.h'
|
||||
# common code, used by actual subspecs
|
||||
s.subspec 'core' do |ss|
|
||||
ss.source_files = 'src/utils/*.{h,c}', 'src/dsp/*.{h,c}', 'src/webp/types.h', 'src/webp/format_constants.h'
|
||||
ss.public_header_files = 'src/webp/types.h', 'src/webp/format_constants.h'
|
||||
end
|
||||
|
||||
# webp decoding
|
||||
s.subspec 'dec' do |ss|
|
||||
ss.dependency 'libwebp/core'
|
||||
ss.source_files = 'src/dec/*.{h,c}', 'src/webp/decode.h'
|
||||
ss.public_header_files = 'src/webp/decode.h'
|
||||
end
|
||||
|
||||
# webp encoding
|
||||
s.subspec 'enc' do |ss|
|
||||
ss.dependency 'libwebp/core'
|
||||
ss.source_files = 'src/enc/*.{h,c}', 'src/webp/encode.h'
|
||||
ss.public_header_files = 'src/webp/encode.h'
|
||||
end
|
||||
|
||||
# animated webp decoding
|
||||
s.subspec 'demux' do |ss|
|
||||
ss.dependency 'libwebp/dec'
|
||||
ss.source_files = 'src/demux/*.{h,c}', 'src/webp/demux.h', 'src/webp/mux_types.h'
|
||||
ss.public_header_files = 'src/webp/demux.h', 'src/webp/mux_types.h'
|
||||
end
|
||||
|
||||
# animated webp encoding
|
||||
s.subspec 'mux' do |ss|
|
||||
ss.dependency 'libwebp/enc'
|
||||
ss.dependency 'libwebp/demux'
|
||||
ss.source_files = 'src/mux/*.{h,c}', 'src/webp/mux.h'
|
||||
ss.public_header_files = 'src/webp/mux.h'
|
||||
end
|
||||
|
||||
# fix #include <inttypes.h> cause 'Include of non-modular header inside framework module error'
|
||||
s.prepare_command = <<-CMD
|
||||
|
|
Loading…
Reference in New Issue