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.
5 config("libpng_config") {
9 "CHROME_PNG_WRITE_SUPPORT",
14 #'toolsets': ['target', 'host'],
15 defines += [ "CHROME_PNG_READ_PACK_SUPPORT" ] # Required by freetype.
19 if (is_component_build) {
28 # Must be in a config because of how GN orders flags (otherwise -Wall will
29 # appear after this, and turn it back on).
30 config("clang_warnings") {
32 # Upstream uses self-assignment to avoid warnings.
33 cflags = [ "-Wno-self-assign" ]
37 source_set("libpng_sources") {
61 configs -= [ "//build/config/compiler:chromium_code" ]
62 configs += [ "//build/config/compiler:no_chromium_code" ]
64 if (is_win && is_component_build) {
65 defines = [ "PNG_BUILD_DLL" ]
68 public_configs = [ ":libpng_config" ]
74 configs += [ ":clang_warnings" ]