Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Commit

Permalink
Fixes build with cocoapods
Browse files Browse the repository at this point in the history
Summary:
We're not able to find webp headers unless we use use the libwebp module name! Seems the same as #187

I just updated cocoapods so likely broke in some version.

Reviewed By: wizh

Differential Revision: D21908724

fbshipit-source-id: 80191464ea3159ac69df4fb93e362e672a2e5ccd
  • Loading branch information
diegosanchezr authored and facebook-github-bot committed Jun 8, 2020
1 parent fd404ba commit 399f2b1
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions SpectrumCore.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Spectrum is a cross-platform image transcoding library that can easily be integr
plugins_webp_spec.source_files = 'cpp/spectrum/plugins/webp/**/*.{h,cpp}'
plugins_webp_spec.header_dir = 'spectrum/plugins/webp'
plugins_webp_spec.header_mappings_dir = 'cpp/spectrum/plugins/webp'
plugins_webp_spec.compiler_flags = "-DCOCOAPODS_BUILD"
end
end
end
4 changes: 4 additions & 0 deletions cpp/spectrum/plugins/webp/LibWebpCompressor.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@

#include <folly/Optional.h>

#ifdef COCOAPODS_BUILD
#include <libwebp/encode.h>
#else
#include <webp/encode.h>
#endif

#include <array>
#include <memory>
Expand Down
4 changes: 4 additions & 0 deletions cpp/spectrum/plugins/webp/LibWebpDecompressor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
#include <spectrum/io/IImageSource.h>
#include <spectrum/plugins/webp/LibWebpConstants.h>

#ifdef COCOAPODS_BUILD
#include <libwebp/decode.h>
#else
#include "webp/decode.h"
#endif

#include <folly/Optional.h>

Expand Down
4 changes: 4 additions & 0 deletions cpp/spectrum/plugins/webp/LibWebpDecompressor.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
#include <spectrum/io/IImageSource.h>

#include <folly/Optional.h>
#ifdef COCOAPODS_BUILD
#include <libwebp/decode.h>
#else
#include <webp/decode.h>
#endif

#include <memory>

Expand Down
2 changes: 1 addition & 1 deletion ios/SpectrumKitSample/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ SPEC CHECKSUMS:
libwebp: 946cb3063cea9236285f7e9a8505d806d30e07f3
mozjpeg: bbe5f12952c272e10063446feaf7ec09a800c5e3
spectrum-folly: 7a893fae801f809e710d4d5a8325034131e0e949
SpectrumCore: b6e3215eecf37f5a34a513149d254cbcb591aea2
SpectrumCore: e4d7e7baa857185184ce8d7f6d5f850ecbd81cfc
SpectrumKit: ab258a700c3a5fd0559fba8b55db24a733eb954e

PODFILE CHECKSUM: a3355323527bc38784cfac19efa6537f855b6fa9
Expand Down

0 comments on commit 399f2b1

Please sign in to comment.