10d665d000
This extends the pattern in freetype2 to expat, icu, libjpeg-turbo, libpng, libwebp, and zlib, and gives all these an arg to control which to use. Homebrew doesn't have dng_sdk, piex, or sftnly, or I'd have done the same for them too. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4260 DOCS_PREVIEW= https://skia.org/?cl=4260 Change-Id: I82e780502bf2217336e791787f172a6fc8f55460 Reviewed-on: https://skia-review.googlesource.com/4260 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Hal Canary <halcanary@google.com>
137 lines
5.7 KiB
Plaintext
137 lines
5.7 KiB
Plaintext
# Copyright 2016 Google Inc.
|
|
#
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
declare_args() {
|
|
skia_use_system_libwebp = false
|
|
}
|
|
|
|
import("../third_party.gni")
|
|
|
|
if (skia_use_system_libwebp) {
|
|
system("libwebp") {
|
|
libs = [
|
|
"webp",
|
|
"webpdemux",
|
|
]
|
|
}
|
|
} else {
|
|
third_party("libwebp") {
|
|
public_include_dirs = [ "../externals/libwebp/src" ]
|
|
|
|
if (is_android) {
|
|
deps = [
|
|
"//third_party/cpu-features",
|
|
]
|
|
}
|
|
|
|
defines = [
|
|
# WebP naturally decodes to RGB_565, and we work with BGR_565.
|
|
# This makes WebP decode to BGR_565 when we ask for RGB_565.
|
|
# (It also swaps the color order for 4444, but we don't care today.)
|
|
# TODO: swizzle ourself in SkWebpCodec instead of requiring this non-standard libwebp.
|
|
"WEBP_SWAP_16BIT_CSP",
|
|
]
|
|
|
|
sources = [
|
|
"../externals/libwebp/src/dec/alpha.c",
|
|
"../externals/libwebp/src/dec/buffer.c",
|
|
"../externals/libwebp/src/dec/frame.c",
|
|
"../externals/libwebp/src/dec/idec.c",
|
|
"../externals/libwebp/src/dec/io.c",
|
|
"../externals/libwebp/src/dec/quant.c",
|
|
"../externals/libwebp/src/dec/tree.c",
|
|
"../externals/libwebp/src/dec/vp8.c",
|
|
"../externals/libwebp/src/dec/vp8l.c",
|
|
"../externals/libwebp/src/dec/webp.c",
|
|
"../externals/libwebp/src/demux/demux.c",
|
|
"../externals/libwebp/src/dsp/alpha_processing.c",
|
|
"../externals/libwebp/src/dsp/alpha_processing_mips_dsp_r2.c",
|
|
"../externals/libwebp/src/dsp/alpha_processing_sse2.c",
|
|
"../externals/libwebp/src/dsp/alpha_processing_sse41.c",
|
|
"../externals/libwebp/src/dsp/argb.c",
|
|
"../externals/libwebp/src/dsp/argb_mips_dsp_r2.c",
|
|
"../externals/libwebp/src/dsp/argb_sse2.c",
|
|
"../externals/libwebp/src/dsp/cost.c",
|
|
"../externals/libwebp/src/dsp/cost_mips32.c",
|
|
"../externals/libwebp/src/dsp/cost_mips_dsp_r2.c",
|
|
"../externals/libwebp/src/dsp/cost_sse2.c",
|
|
"../externals/libwebp/src/dsp/cpu.c",
|
|
"../externals/libwebp/src/dsp/dec.c",
|
|
"../externals/libwebp/src/dsp/dec_clip_tables.c",
|
|
"../externals/libwebp/src/dsp/dec_mips32.c",
|
|
"../externals/libwebp/src/dsp/dec_mips_dsp_r2.c",
|
|
"../externals/libwebp/src/dsp/dec_neon.c",
|
|
"../externals/libwebp/src/dsp/dec_sse2.c",
|
|
"../externals/libwebp/src/dsp/dec_sse41.c",
|
|
"../externals/libwebp/src/dsp/enc.c",
|
|
"../externals/libwebp/src/dsp/enc_avx2.c",
|
|
"../externals/libwebp/src/dsp/enc_mips32.c",
|
|
"../externals/libwebp/src/dsp/enc_mips_dsp_r2.c",
|
|
"../externals/libwebp/src/dsp/enc_neon.c",
|
|
"../externals/libwebp/src/dsp/enc_sse2.c",
|
|
"../externals/libwebp/src/dsp/enc_sse41.c",
|
|
"../externals/libwebp/src/dsp/filters.c",
|
|
"../externals/libwebp/src/dsp/filters_mips_dsp_r2.c",
|
|
"../externals/libwebp/src/dsp/filters_sse2.c",
|
|
"../externals/libwebp/src/dsp/lossless.c",
|
|
"../externals/libwebp/src/dsp/lossless_enc.c",
|
|
"../externals/libwebp/src/dsp/lossless_enc_mips32.c",
|
|
"../externals/libwebp/src/dsp/lossless_enc_mips_dsp_r2.c",
|
|
"../externals/libwebp/src/dsp/lossless_enc_neon.c",
|
|
"../externals/libwebp/src/dsp/lossless_enc_sse2.c",
|
|
"../externals/libwebp/src/dsp/lossless_enc_sse41.c",
|
|
"../externals/libwebp/src/dsp/lossless_mips_dsp_r2.c",
|
|
"../externals/libwebp/src/dsp/lossless_neon.c",
|
|
"../externals/libwebp/src/dsp/lossless_sse2.c",
|
|
"../externals/libwebp/src/dsp/rescaler.c",
|
|
"../externals/libwebp/src/dsp/rescaler_mips32.c",
|
|
"../externals/libwebp/src/dsp/rescaler_mips_dsp_r2.c",
|
|
"../externals/libwebp/src/dsp/rescaler_neon.c",
|
|
"../externals/libwebp/src/dsp/rescaler_sse2.c",
|
|
"../externals/libwebp/src/dsp/upsampling.c",
|
|
"../externals/libwebp/src/dsp/upsampling_mips_dsp_r2.c",
|
|
"../externals/libwebp/src/dsp/upsampling_neon.c",
|
|
"../externals/libwebp/src/dsp/upsampling_sse2.c",
|
|
"../externals/libwebp/src/dsp/yuv.c",
|
|
"../externals/libwebp/src/dsp/yuv_mips32.c",
|
|
"../externals/libwebp/src/dsp/yuv_mips_dsp_r2.c",
|
|
"../externals/libwebp/src/dsp/yuv_sse2.c",
|
|
"../externals/libwebp/src/enc/alpha.c",
|
|
"../externals/libwebp/src/enc/analysis.c",
|
|
"../externals/libwebp/src/enc/backward_references.c",
|
|
"../externals/libwebp/src/enc/config.c",
|
|
"../externals/libwebp/src/enc/cost.c",
|
|
"../externals/libwebp/src/enc/filter.c",
|
|
"../externals/libwebp/src/enc/frame.c",
|
|
"../externals/libwebp/src/enc/histogram.c",
|
|
"../externals/libwebp/src/enc/iterator.c",
|
|
"../externals/libwebp/src/enc/near_lossless.c",
|
|
"../externals/libwebp/src/enc/picture.c",
|
|
"../externals/libwebp/src/enc/picture_csp.c",
|
|
"../externals/libwebp/src/enc/picture_psnr.c",
|
|
"../externals/libwebp/src/enc/picture_rescale.c",
|
|
"../externals/libwebp/src/enc/picture_tools.c",
|
|
"../externals/libwebp/src/enc/quant.c",
|
|
"../externals/libwebp/src/enc/syntax.c",
|
|
"../externals/libwebp/src/enc/token.c",
|
|
"../externals/libwebp/src/enc/tree.c",
|
|
"../externals/libwebp/src/enc/vp8l.c",
|
|
"../externals/libwebp/src/enc/webpenc.c",
|
|
"../externals/libwebp/src/utils/bit_reader.c",
|
|
"../externals/libwebp/src/utils/bit_writer.c",
|
|
"../externals/libwebp/src/utils/color_cache.c",
|
|
"../externals/libwebp/src/utils/filters.c",
|
|
"../externals/libwebp/src/utils/huffman.c",
|
|
"../externals/libwebp/src/utils/huffman_encode.c",
|
|
"../externals/libwebp/src/utils/quant_levels.c",
|
|
"../externals/libwebp/src/utils/quant_levels_dec.c",
|
|
"../externals/libwebp/src/utils/random.c",
|
|
"../externals/libwebp/src/utils/rescaler.c",
|
|
"../externals/libwebp/src/utils/thread.c",
|
|
"../externals/libwebp/src/utils/utils.c",
|
|
]
|
|
}
|
|
}
|