Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Unified Diff: third_party/libwebp/libwebp.gyp

Issue 14203006: Extract use_system_foo logic out of gyp files, patch 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/libwebp/libwebp.gyp
diff --git a/third_party/libwebp/libwebp.gyp b/third_party/libwebp/libwebp.gyp
index 10a66154aaebd006e5a978b95358154f77439b43..4fb6175d8cf24ee149f02a59c0cf8a3a517ee5c6 100644
--- a/third_party/libwebp/libwebp.gyp
+++ b/third_party/libwebp/libwebp.gyp
@@ -3,176 +3,146 @@
# found in the LICENSE file.
{
- 'variables': {
- 'use_system_libwebp%': 0,
- },
- 'conditions': [
- ['use_system_libwebp==0', {
- 'targets': [
- {
- 'target_name': 'libwebp_dec',
- 'type': 'static_library',
- 'include_dirs': ['.'],
- 'sources': [
- 'dec/alpha.c',
- 'dec/buffer.c',
- 'dec/frame.c',
- 'dec/idec.c',
- 'dec/io.c',
- 'dec/layer.c',
- 'dec/quant.c',
- 'dec/tree.c',
- 'dec/vp8.c',
- 'dec/vp8l.c',
- 'dec/webp.c',
- ],
- },
- {
- 'target_name': 'libwebp_demux',
- 'type': 'static_library',
- 'include_dirs': ['.'],
- 'sources': [
- 'demux/demux.c',
- ],
- },
- {
- 'target_name': 'libwebp_dsp',
- 'type': 'static_library',
- 'include_dirs': ['.'],
- 'sources': [
- 'dsp/cpu.c',
- 'dsp/dec.c',
- 'dsp/dec_sse2.c',
- 'dsp/enc.c',
- 'dsp/enc_sse2.c',
- 'dsp/lossless.c',
- 'dsp/upsampling.c',
- 'dsp/upsampling_sse2.c',
- 'dsp/yuv.c',
- ],
- 'conditions': [
- ['OS == "android"', {
- 'includes': [ '../../build/android/cpufeatures.gypi' ],
- }],
- ['order_profiling != 0', {
- 'target_conditions' : [
- ['_toolset=="target"', {
- 'cflags!': [ '-finstrument-functions' ],
- }],
- ],
- }],
- ],
- },
- {
- 'target_name': 'libwebp_dsp_neon',
- 'conditions': [
- ['armv7 == 1', {
- 'type': 'static_library',
- 'include_dirs': ['.'],
- 'sources': [
- 'dsp/dec_neon.c',
- 'dsp/enc_neon.c',
- 'dsp/upsampling_neon.c',
- ],
- # behavior similar to *.c.neon in an Android.mk
- 'cflags!': [ '-mfpu=vfpv3-d16' ],
- 'cflags': [ '-mfpu=neon' ],
- },{ # "armv7 != 1"
- 'type': 'none',
- }],
- ['order_profiling != 0', {
- 'target_conditions' : [
- ['_toolset=="target"', {
- 'cflags!': [ '-finstrument-functions' ],
- }],
- ],
+ 'targets': [
+ {
+ 'target_name': 'libwebp_dec',
+ 'type': 'static_library',
+ 'include_dirs': ['.'],
+ 'sources': [
+ 'dec/alpha.c',
+ 'dec/buffer.c',
+ 'dec/frame.c',
+ 'dec/idec.c',
+ 'dec/io.c',
+ 'dec/layer.c',
+ 'dec/quant.c',
+ 'dec/tree.c',
+ 'dec/vp8.c',
+ 'dec/vp8l.c',
+ 'dec/webp.c',
+ ],
+ },
+ {
+ 'target_name': 'libwebp_demux',
+ 'type': 'static_library',
+ 'include_dirs': ['.'],
+ 'sources': [
+ 'demux/demux.c',
+ ],
+ },
+ {
+ 'target_name': 'libwebp_dsp',
+ 'type': 'static_library',
+ 'include_dirs': ['.'],
+ 'sources': [
+ 'dsp/cpu.c',
+ 'dsp/dec.c',
+ 'dsp/dec_sse2.c',
+ 'dsp/enc.c',
+ 'dsp/enc_sse2.c',
+ 'dsp/lossless.c',
+ 'dsp/upsampling.c',
+ 'dsp/upsampling_sse2.c',
+ 'dsp/yuv.c',
+ ],
+ 'conditions': [
+ ['OS == "android"', {
+ 'includes': [ '../../build/android/cpufeatures.gypi' ],
+ }],
+ ['order_profiling != 0', {
+ 'target_conditions' : [
+ ['_toolset=="target"', {
+ 'cflags!': [ '-finstrument-functions' ],
}],
],
- },
- {
- 'target_name': 'libwebp_enc',
- 'type': 'static_library',
- 'include_dirs': ['.'],
- 'sources': [
- 'enc/alpha.c',
- 'enc/analysis.c',
- 'enc/backward_references.c',
- 'enc/config.c',
- 'enc/cost.c',
- 'enc/filter.c',
- 'enc/frame.c',
- 'enc/histogram.c',
- 'enc/iterator.c',
- 'enc/layer.c',
- 'enc/picture.c',
- 'enc/quant.c',
- 'enc/syntax.c',
- 'enc/token.c',
- 'enc/tree.c',
- 'enc/vp8l.c',
- 'enc/webpenc.c',
- ],
- },
- {
- 'target_name': 'libwebp_utils',
+ }],
+ ],
+ },
+ {
+ 'target_name': 'libwebp_dsp_neon',
+ 'conditions': [
+ ['armv7 == 1', {
'type': 'static_library',
'include_dirs': ['.'],
'sources': [
- 'utils/bit_reader.c',
- 'utils/bit_writer.c',
- 'utils/color_cache.c',
- 'utils/filters.c',
- 'utils/huffman.c',
- 'utils/huffman_encode.c',
- 'utils/quant_levels.c',
- 'utils/quant_levels_dec.c',
- 'utils/rescaler.c',
- 'utils/thread.c',
- 'utils/utils.c',
+ 'dsp/dec_neon.c',
+ 'dsp/enc_neon.c',
+ 'dsp/upsampling_neon.c',
],
- },
- {
- 'target_name': 'libwebp',
+ # behavior similar to *.c.neon in an Android.mk
+ 'cflags!': [ '-mfpu=vfpv3-d16' ],
+ 'cflags': [ '-mfpu=neon' ],
+ },{ # "armv7 != 1"
'type': 'none',
- 'dependencies' : [
- 'libwebp_dec',
- 'libwebp_demux',
- 'libwebp_dsp',
- 'libwebp_dsp_neon',
- 'libwebp_enc',
- 'libwebp_utils',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': ['.'],
- },
- 'conditions': [
- ['OS!="win"', {'product_name': 'webp'}],
+ }],
+ ['order_profiling != 0', {
+ 'target_conditions' : [
+ ['_toolset=="target"', {
+ 'cflags!': [ '-finstrument-functions' ],
+ }],
],
- },
+ }],
],
- }, {
- 'targets': [
- {
- 'target_name': 'libwebp',
- 'type': 'none',
- 'direct_dependent_settings': {
- 'defines': [
- 'ENABLE_WEBP',
- ],
- },
- 'link_settings': {
- 'libraries': [
- # Check for presence of webpdemux library, use it if present.
- '<!(python <(DEPTH)/tools/compile_test/compile_test.py '
- '--code "int main() { return 0; }" '
- '--run-linker '
- '--on-success "-lwebp -lwebpdemux" '
- '--on-failure "-lwebp" '
- '-- -lwebpdemux)',
- ],
- },
- }
+ },
+ {
+ 'target_name': 'libwebp_enc',
+ 'type': 'static_library',
+ 'include_dirs': ['.'],
+ 'sources': [
+ 'enc/alpha.c',
+ 'enc/analysis.c',
+ 'enc/backward_references.c',
+ 'enc/config.c',
+ 'enc/cost.c',
+ 'enc/filter.c',
+ 'enc/frame.c',
+ 'enc/histogram.c',
+ 'enc/iterator.c',
+ 'enc/layer.c',
+ 'enc/picture.c',
+ 'enc/quant.c',
+ 'enc/syntax.c',
+ 'enc/token.c',
+ 'enc/tree.c',
+ 'enc/vp8l.c',
+ 'enc/webpenc.c',
+ ],
+ },
+ {
+ 'target_name': 'libwebp_utils',
+ 'type': 'static_library',
+ 'include_dirs': ['.'],
+ 'sources': [
+ 'utils/bit_reader.c',
+ 'utils/bit_writer.c',
+ 'utils/color_cache.c',
+ 'utils/filters.c',
+ 'utils/huffman.c',
+ 'utils/huffman_encode.c',
+ 'utils/quant_levels.c',
+ 'utils/quant_levels_dec.c',
+ 'utils/rescaler.c',
+ 'utils/thread.c',
+ 'utils/utils.c',
+ ],
+ },
+ {
+ 'target_name': 'libwebp',
+ 'type': 'none',
+ 'dependencies' : [
+ 'libwebp_dec',
+ 'libwebp_demux',
+ 'libwebp_dsp',
+ 'libwebp_dsp_neon',
+ 'libwebp_enc',
+ 'libwebp_utils',
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': ['.'],
+ },
+ 'conditions': [
+ ['OS!="win"', {'product_name': 'webp'}],
],
- }],
+ },
],
}

Powered by Google App Engine
This is Rietveld 408576698