1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6 import("//build/config/android/config.gni")
10 # Uses system libjpeg. If true, overrides use_libjpeg_turbo.
11 use_system_libjpeg = is_android && is_android_webview_build
13 # Uses libjpeg_turbo as the jpeg implementation. Has no effect if
14 # use_system_libjpeg is set.
15 use_libjpeg_turbo = true
18 config("system_libjpeg_config") {
19 defines = [ "USE_SYSTEM_LIBJPEG" ]
22 config("libjpeg_turbo_config") {
23 defines = [ "USE_LIBJPEG_TURBO" ]
26 # This is a meta target that forwards to the system's libjpeg,
27 # third_party/libjpeg, or third_party/libjpeg_turbo depending on the build args
28 # declared in this file.
30 if (use_system_libjpeg) {
32 direct_dependent_configs = [ ":system_libjpeg_config" ]
33 } else if (use_libjpeg_turbo) {
34 deps = [ "//third_party/libjpeg_turbo:libjpeg" ]
35 direct_dependent_configs = [ ":libjpeg_turbo_config" ]
37 deps = [ "//third_party/libjpeg:libjpeg" ]