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. 4 5 { 6 'targets': [ 7 { 8 'target_name': 'libpng', 9 'dependencies': [ 10 '../zlib/zlib.gyp:zlib', 11 ], 12 'defines': [ 13 'CHROME_PNG_WRITE_SUPPORT', 14 'PNG_USER_CONFIG', 15 ], 16 'sources': [ 17 'png.c', 18 'png.h', 19 'pngconf.h', 20 'pngerror.c', 21 'pnggccrd.c', 22 'pngget.c', 23 'pngmem.c', 24 'pngpread.c', 25 'pngread.c', 26 'pngrio.c', 27 'pngrtran.c', 28 'pngrutil.c', 29 'pngset.c', 30 'pngtrans.c', 31 'pngusr.h', 32 'pngvcrd.c', 33 'pngwio.c', 34 'pngwrite.c', 35 'pngwtran.c', 36 'pngwutil.c', 37 ], 38 'direct_dependent_settings': { 39 'include_dirs': [ 40 '.', 41 ], 42 'defines': [ 43 'CHROME_PNG_WRITE_SUPPORT', 44 'PNG_USER_CONFIG', 45 ], 46 }, 47 'export_dependent_settings': [ 48 '../zlib/zlib.gyp:zlib', 49 ], 50 # TODO(jschuh): http://crbug.com/167187 51 'msvs_disabled_warnings': [ 4267 ], 52 'conditions': [ 53 ['OS!="win"', {'product_name': 'png'}], 54 ['OS=="win"', { 55 'type': '<(component)', 56 }, { 57 # Chromium libpng does not support building as a shared_library 58 # on non-Windows platforms. 59 'type': 'static_library', 60 }], 61 ['OS=="win" and component=="shared_library"', { 62 'defines': [ 63 'PNG_BUILD_DLL', 64 'PNG_NO_MODULEDEF', 65 ], 66 'direct_dependent_settings': { 67 'defines': [ 68 'PNG_USE_DLL', 69 ], 70 }, 71 }], 72 ['OS=="android"', { 73 'toolsets': ['target', 'host'], 74 }], 75 ], 76 }, 77 ] 78 } 79