Chromium Code Reviews| OLD | NEW | 
|---|---|
| 1 # Copyright 2014 Google Inc. | 1 # Copyright 2014 Google Inc. | 
| 2 # | 2 # | 
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be | 
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. | 
| 5 | 5 | 
| 6 { | 6 { | 
| 7 'variables': { | 7 'variables': { | 
| 8 'skia_warnings_as_errors': 0, | 8 'skia_warnings_as_errors': 0, | 
| 9 }, | 9 }, | 
| 10 'targets': [ | 10 'targets': [ | 
| 11 { | 11 { | 
| 12 'target_name': 'libpng', | 12 'target_name': 'libpng', | 
| 13 'type': 'none', | |
| 13 'conditions': [ | 14 'conditions': [ | 
| 14 [ 'skia_libpng_static', | 15 [ 'skia_os == "android"', | 
| 15 { | 16 { | 
| 16 'type': 'static_library', | |
| 17 'include_dirs': [ | |
| 18 '../third_party/externals/libpng', | |
| 19 # Needed for generated pnglibconf.h | |
| 20 '../third_party/libpng', | |
| 21 ], | |
| 22 'dependencies': [ | 17 'dependencies': [ | 
| 23 'zlib.gyp:zlib', | 18 'android_deps.gyp:png', | 
| 24 ], | 19 ], | 
| 25 'export_dependent_settings': [ | 20 'export_dependent_settings': [ | 
| 26 'zlib.gyp:zlib', | 21 'android_deps.gyp:png', | 
| 27 ], | 22 ], | 
| 28 'direct_dependent_settings': { | 23 }, { # skia_os != "android" | 
| 29 'include_dirs': [ | 24 'dependencies': [ | 
| 30 '../third_party/externals/libpng', | 25 'libpng.gyp:libpng_static', | 
| 31 # Needed for generated pnglibconf.h | |
| 32 '../third_party/libpng', | |
| 33 ], | |
| 34 }, | |
| 35 'cflags': [ | |
| 36 '-w', | |
| 37 '-fvisibility=hidden', | |
| 38 ], | 26 ], | 
| 39 'conditions': [ | 27 'export_dependent_settings': [ | 
| 40 ['not arm_neon', { | 28 'libpng.gyp:libpng_static', | 
| 41 'defines': [ | |
| 42 # FIXME: Why is this needed? Without it, pngpriv.h sets it | |
| 43 # to 2 if __ARM_NEON is defined, but shouldn't __ARM_NEON | |
| 44 # not be defined since arm_neon is 0? | |
| 45 'PNG_ARM_NEON_OPT=0', | |
| 46 ], | |
| 47 }], | |
| 48 ], | 29 ], | 
| 49 'sources': [ | |
| 50 '../third_party/externals/libpng/png.c', | |
| 51 '../third_party/externals/libpng/pngerror.c', | |
| 52 '../third_party/externals/libpng/pngget.c', | |
| 53 '../third_party/externals/libpng/pngmem.c', | |
| 54 '../third_party/externals/libpng/pngpread.c', | |
| 55 '../third_party/externals/libpng/pngread.c', | |
| 56 '../third_party/externals/libpng/pngrio.c', | |
| 57 '../third_party/externals/libpng/pngrtran.c', | |
| 58 '../third_party/externals/libpng/pngrutil.c', | |
| 59 '../third_party/externals/libpng/pngset.c', | |
| 60 '../third_party/externals/libpng/pngtrans.c', | |
| 61 '../third_party/externals/libpng/pngwio.c', | |
| 62 '../third_party/externals/libpng/pngwrite.c', | |
| 63 '../third_party/externals/libpng/pngwtran.c', | |
| 64 '../third_party/externals/libpng/pngwutil.c', | |
| 65 ], | |
| 66 }, { # not skia_libpng_static | |
| 67 'type': 'none', | |
| 68 'conditions': [ | |
| 69 [ 'skia_os == "android"', | |
| 70 { | |
| 71 # TODO(halcanary): merge all png targets into this file. | |
| 72 'dependencies': [ | |
| 73 'android_deps.gyp:png', | |
| 74 ], | |
| 75 'export_dependent_settings': [ | |
| 76 'android_deps.gyp:png', | |
| 77 ], | |
| 78 }, { # skia_os != "android" | |
| 79 'dependencies': [ | |
| 80 'zlib.gyp:zlib', | |
| 81 ], | |
| 82 'export_dependent_settings': [ | |
| 83 'zlib.gyp:zlib', | |
| 84 ], | |
| 85 'direct_dependent_settings': { | |
| 86 'link_settings': { | |
| 87 'libraries': [ | |
| 88 '-lpng', | |
| 89 ], | |
| 90 }, | |
| 91 }, | |
| 92 } | |
| 93 ] | |
| 94 ] | |
| 95 } | 30 } | 
| 96 ] | 31 ] | 
| 32 ] | |
| 33 }, | |
| 34 { | |
| 35 'target_name': 'libpng_static', | |
| 36 'type': 'static_library', | |
| 37 'standalone_static_library': 1, | |
| 38 'include_dirs': [ | |
| 39 # Needed for generated pnglibconf.h | |
| 
 
scroggo
2015/04/01 15:40:20
and pngprefix.h
 
djsollen
2015/04/01 17:19:01
Done.
 
 | |
| 40 '../third_party/libpng', | |
| 41 '../third_party/externals/libpng', | |
| 42 ], | |
| 43 'dependencies': [ | |
| 44 'zlib.gyp:zlib', | |
| 45 ], | |
| 46 'export_dependent_settings': [ | |
| 47 'zlib.gyp:zlib', | |
| 48 ], | |
| 49 'direct_dependent_settings': { | |
| 50 'include_dirs': [ | |
| 51 '../third_party/externals/libpng', | |
| 52 # Needed for generated pnglibconf.h | |
| 
 
scroggo
2015/04/01 15:40:20
and pngprefix.h
 
djsollen
2015/04/01 17:19:01
Done.
 
 | |
| 53 '../third_party/libpng', | |
| 54 ], | |
| 55 'defines': [ | |
| 56 'SKIA_PNG_PREFIXED', | |
| 57 ], | |
| 58 }, | |
| 59 'cflags': [ | |
| 60 '-w', | |
| 61 '-fvisibility=hidden', | |
| 62 ], | |
| 63 'defines': [ | |
| 
 
scroggo
2015/04/01 15:40:20
spacing?
 
djsollen
2015/04/01 17:19:01
Done.
 
 | |
| 64 'SKIA_PNG_PREFIXED', | |
| 65 ], | |
| 66 'sources': [ | |
| 67 '../third_party/externals/libpng/png.c', | |
| 68 '../third_party/externals/libpng/pngerror.c', | |
| 69 '../third_party/externals/libpng/pngget.c', | |
| 70 '../third_party/externals/libpng/pngmem.c', | |
| 71 '../third_party/externals/libpng/pngpread.c', | |
| 72 '../third_party/externals/libpng/pngread.c', | |
| 73 '../third_party/externals/libpng/pngrio.c', | |
| 74 '../third_party/externals/libpng/pngrtran.c', | |
| 75 '../third_party/externals/libpng/pngrutil.c', | |
| 76 '../third_party/externals/libpng/pngset.c', | |
| 77 '../third_party/externals/libpng/pngtrans.c', | |
| 78 '../third_party/externals/libpng/pngwio.c', | |
| 79 '../third_party/externals/libpng/pngwrite.c', | |
| 80 '../third_party/externals/libpng/pngwtran.c', | |
| 81 '../third_party/externals/libpng/pngwutil.c', | |
| 82 ], | |
| 83 'conditions': [ | |
| 84 ['arm_neon or arm_neon_optional', { | |
| 85 'defines': [ | |
| 86 'PNG_ARM_NEON_OPT=2', | |
| 87 ], | |
| 88 'sources': [ | |
| 89 '../third_party/externals/libpng/arm/arm_init.c', | |
| 
 
scroggo
2015/04/01 15:40:20
Maybe add a comment to the description that you're
 
djsollen
2015/04/01 17:19:01
Done.
 
 | |
| 90 '../third_party/externals/libpng/arm/filter_neon.S', | |
| 91 '../third_party/externals/libpng/arm/filter_neon_intrinsics.c', | |
| 92 ], | |
| 93 }, { # !neon | |
| 94 'defines': [ | |
| 95 # not sure if I need this | |
| 
 
scroggo
2015/04/01 15:40:20
I assume this replaces my old FIXME?
 
djsollen
2015/04/01 17:19:01
Done.
 
scroggo
2015/04/01 17:20:48
No longer needed after all?
 
 | |
| 96 'PNG_ARM_NEON_OPT=0', | |
| 97 ], | |
| 98 }], | |
| 97 ], | 99 ], | 
| 98 }, | 100 }, | 
| 99 ] | 101 ] | 
| 100 } | 102 } | 
| OLD | NEW |