1 # Copyright (c) 2012 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.
8 [ 'os_posix == 1 and OS != "mac" and OS != "android"', {
9 # Maybe link to system .so once the security concerns are thought
10 # through, since we already use it due to GTK.
11 'use_system_libpng%': 0,
12 }, { # os_posix != 1 or OS == "mac"
13 'use_system_libpng%': 0,
18 ['use_system_libpng==0', {
21 'target_name': 'libpng',
23 '../zlib/zlib.gyp:zlib',
26 'CHROME_PNG_WRITE_SUPPORT',
51 'direct_dependent_settings': {
56 'CHROME_PNG_WRITE_SUPPORT',
60 'export_dependent_settings': [
61 '../zlib/zlib.gyp:zlib',
63 # TODO(jschuh): http://crbug.com/167187
64 'msvs_disabled_warnings': [ 4267 ],
66 ['OS!="win"', {'product_name': 'png'}],
68 'type': '<(component)',
70 # Chromium libpng does not support building as a shared_library
71 # on non-Windows platforms.
72 'type': 'static_library',
74 ['OS=="win" and component=="shared_library"', {
79 'direct_dependent_settings': {
86 'toolsets': ['target', 'host'],
95 'pkg-config': '../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
99 'pkg-config': 'pkg-config'
105 'target_name': 'libpng',
108 '../zlib/zlib.gyp:zlib',
110 'direct_dependent_settings': {
112 '<!@(<(pkg-config) --cflags libpng)',
117 '<!@(<(pkg-config) --libs-only-L --libs-only-other libpng)',
120 '<!@(<(pkg-config) --libs-only-l libpng)',
124 'headers_root_path': '.',
125 'header_filenames': [
131 '../../build/shim_headers.gypi',