diff options
author | urvang@google.com <urvang@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-16 03:01:03 +0000 |
---|---|---|
committer | urvang@google.com <urvang@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-16 03:01:03 +0000 |
commit | 4b08b3484cdd660196f73c3c2fde08ca747518ce (patch) | |
tree | 28f847c7aa9d0a1f46db6c4e10b34a97682a94b4 /third_party/libwebp | |
parent | c0751fbed94500ea05cfc8ba99a76039ec813b0e (diff) | |
download | chromium_src-4b08b3484cdd660196f73c3c2fde08ca747518ce.zip chromium_src-4b08b3484cdd660196f73c3c2fde08ca747518ce.tar.gz chromium_src-4b08b3484cdd660196f73c3c2fde08ca747518ce.tar.bz2 |
libwebp: Add a Build file for GN (from libwebp.gyp)
Android specific build rules, and some other rules not converted yet.
BUG=
Review URL: https://codereview.chromium.org/238523003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264086 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/libwebp')
-rw-r--r-- | third_party/libwebp/BUILD.gn | 161 |
1 files changed, 161 insertions, 0 deletions
diff --git a/third_party/libwebp/BUILD.gn b/third_party/libwebp/BUILD.gn new file mode 100644 index 0000000..44b2dbd --- /dev/null +++ b/third_party/libwebp/BUILD.gn @@ -0,0 +1,161 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +config("libwebp_config") { + include_dirs = [ "." ] +} + +source_set("libwebp_dec") { + 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", + ] + deps = [ + ":libwebp_dsp", +# TODO(GYP): +# ":libwebp_dsp_neon", + ":libwebp_utils", + ] + all_dependent_configs = [ + ":libwebp_config" + ] +} + +source_set("libwebp_demux") { + sources = [ + "demux/demux.c", + ] + all_dependent_configs = [ + ":libwebp_config" + ] +} + + +source_set("libwebp_dsp") { + 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", + ] + all_dependent_configs = [ + ":libwebp_config" + ] +# TODO(GYP): +# 'conditions': [ +# ['OS == "android"', { +# 'includes': [ '../../build/android/cpufeatures.gypi' ], +# }], +# ['order_profiling != 0', { +# 'target_conditions' : [ +# ['_toolset=="target"', { +# 'cflags!': [ '-finstrument-functions' ], +# }], +# ], +# }], +# ], +} + +# TODO(GYP): +# { +# 'target_name': 'libwebp_dsp_neon', +# 'conditions': [ +# ['target_arch == "arm" and arm_version >= 7 and (arm_neon == 1 or arm_neon_optional == 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' ], +# },{ # "target_arch != "arm" or arm_version < 7" +# 'type': 'none', +# }], +# ['order_profiling != 0', { +# 'target_conditions' : [ +# ['_toolset=="target"', { +# 'cflags!': [ '-finstrument-functions' ], +# }], +# ], +# }], +# ], +# }, + +source_set("libwebp_enc") { + 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", + ] + all_dependent_configs = [ + ":libwebp_config" + ] +} + +source_set("libwebp_utils") { + sources = [ + "utils/alpha_processing.c", + "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/random.c", + "utils/rescaler.c", + "utils/thread.c", + "utils/utils.c", + ] + all_dependent_configs = [ + ":libwebp_config" + ] +} + +group("libwebp") { + deps = [ + ":libwebp_dec", + ":libwebp_demux", + ":libwebp_dsp", +# TODO(GYP): +# ":libwebp_dsp_neon", + ":libwebp_enc", + ":libwebp_utils", + ] + direct_dependent_configs = [ + ":libwebp_config" + ] +} |