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 (component_mode == "shared_library") {
28 source_set("libpng_sources") {
52 configs -= [ "//build/config/compiler:chromium_code" ]
53 configs += [ "//build/config/compiler:no_chromium_code" ]
55 if (is_win && is_component_build) {
56 defines = [ "PNG_BUILD_DLL" ]
59 public_configs = [ ":libpng_config" ]
65 # Must be in a config because of how GN orders flags (otherwise -Wall will
66 # appear after this, and turn it back on).
67 config("clang_warnings") {
69 # Upstream uses self-assignment to avoid warnings.
70 cflags = [ "-Wno-self-assign" ]
73 configs += [ ":clang_warnings" ]