commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 1 | # Copyright 2014 Google Inc. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license that can be |
| 4 | # found in the LICENSE file. |
| 5 | |
| 6 | { |
| 7 | 'variables': { |
| 8 | 'skia_warnings_as_errors': 0, |
| 9 | }, |
| 10 | 'targets': [ |
| 11 | { |
| 12 | 'target_name': 'libpng', |
djsollen | b2a6fe7 | 2015-04-03 12:35:27 -0700 | [diff] [blame] | 13 | 'type': 'none', |
commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 14 | 'conditions': [ |
mtklein | a5114d7 | 2015-08-24 13:27:01 -0700 | [diff] [blame] | 15 | [ 'skia_android_framework', { |
| 16 | 'dependencies': [ 'android_deps.gyp:png' ], |
| 17 | 'export_dependent_settings': [ 'android_deps.gyp:png' ], |
| 18 | },{ |
| 19 | 'dependencies': [ 'libpng.gyp:libpng_static' ], |
| 20 | 'export_dependent_settings': [ 'libpng.gyp:libpng_static' ], |
| 21 | }] |
djsollen | b2a6fe7 | 2015-04-03 12:35:27 -0700 | [diff] [blame] | 22 | ] |
| 23 | }, |
| 24 | { |
| 25 | 'target_name': 'libpng_static', |
| 26 | 'type': 'static_library', |
| 27 | 'standalone_static_library': 1, |
| 28 | 'include_dirs': [ |
djsollen | b2a6fe7 | 2015-04-03 12:35:27 -0700 | [diff] [blame] | 29 | '../third_party/libpng', |
djsollen | b2a6fe7 | 2015-04-03 12:35:27 -0700 | [diff] [blame] | 30 | ], |
| 31 | 'dependencies': [ |
| 32 | 'zlib.gyp:zlib', |
| 33 | ], |
| 34 | 'export_dependent_settings': [ |
| 35 | 'zlib.gyp:zlib', |
| 36 | ], |
| 37 | 'direct_dependent_settings': { |
| 38 | 'include_dirs': [ |
djsollen | b2a6fe7 | 2015-04-03 12:35:27 -0700 | [diff] [blame] | 39 | '../third_party/libpng', |
| 40 | ], |
djsollen | b2a6fe7 | 2015-04-03 12:35:27 -0700 | [diff] [blame] | 41 | }, |
| 42 | 'cflags': [ |
| 43 | '-w', |
| 44 | '-fvisibility=hidden', |
| 45 | ], |
| 46 | 'sources': [ |
scroggo | 3965825 | 2016-06-02 12:59:59 -0700 | [diff] [blame] | 47 | '../third_party/libpng/png.c', |
| 48 | '../third_party/libpng/pngerror.c', |
| 49 | '../third_party/libpng/pngget.c', |
| 50 | '../third_party/libpng/pngmem.c', |
| 51 | '../third_party/libpng/pngpread.c', |
| 52 | '../third_party/libpng/pngread.c', |
| 53 | '../third_party/libpng/pngrio.c', |
| 54 | '../third_party/libpng/pngrtran.c', |
| 55 | '../third_party/libpng/pngrutil.c', |
| 56 | '../third_party/libpng/pngset.c', |
| 57 | '../third_party/libpng/pngtrans.c', |
| 58 | '../third_party/libpng/pngwio.c', |
| 59 | '../third_party/libpng/pngwrite.c', |
| 60 | '../third_party/libpng/pngwtran.c', |
| 61 | '../third_party/libpng/pngwutil.c', |
djsollen | b2a6fe7 | 2015-04-03 12:35:27 -0700 | [diff] [blame] | 62 | ], |
| 63 | 'conditions': [ |
msarett | 740668d | 2016-02-19 11:14:43 -0800 | [diff] [blame] | 64 | [ '"x86" in skia_arch_type', { |
djsollen | b2a6fe7 | 2015-04-03 12:35:27 -0700 | [diff] [blame] | 65 | 'defines': [ |
msarett | 740668d | 2016-02-19 11:14:43 -0800 | [diff] [blame] | 66 | 'PNG_INTEL_SSE_OPT=1', |
djsollen | b2a6fe7 | 2015-04-03 12:35:27 -0700 | [diff] [blame] | 67 | ], |
msarett | 740668d | 2016-02-19 11:14:43 -0800 | [diff] [blame] | 68 | 'sources': [ |
scroggo | 3965825 | 2016-06-02 12:59:59 -0700 | [diff] [blame] | 69 | '../third_party/libpng/contrib/intel/intel_init.c', |
| 70 | '../third_party/libpng/contrib/intel/filter_sse2_intrinsics.c', |
djsollen | b2a6fe7 | 2015-04-03 12:35:27 -0700 | [diff] [blame] | 71 | ], |
| 72 | }], |
msarett | 740668d | 2016-02-19 11:14:43 -0800 | [diff] [blame] | 73 | [ '(("arm64" == skia_arch_type) or \ |
| 74 | ("arm" == skia_arch_type and arm_neon == 1)) and \ |
| 75 | ("ios" != skia_os)', { |
| 76 | 'defines': [ |
| 77 | 'PNG_ARM_NEON_OPT=2', |
| 78 | 'PNG_ARM_NEON_IMPLEMENTATION=1', |
| 79 | ], |
| 80 | 'sources': [ |
scroggo | 3965825 | 2016-06-02 12:59:59 -0700 | [diff] [blame] | 81 | '../third_party/libpng/arm/arm_init.c', |
| 82 | '../third_party/libpng/arm/filter_neon_intrinsics.c', |
msarett | 740668d | 2016-02-19 11:14:43 -0800 | [diff] [blame] | 83 | ], |
| 84 | }], |
| 85 | [ '"ios" == skia_os', { |
| 86 | 'defines': [ |
| 87 | 'PNG_ARM_NEON_OPT=0', |
djsollen | b2a6fe7 | 2015-04-03 12:35:27 -0700 | [diff] [blame] | 88 | ], |
| 89 | }], |
| 90 | ], |
| 91 | } |
commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 92 | ] |
| 93 | } |