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 'type': 'none', |
14 'conditions': [ | 14 'conditions': [ |
15 [ 'skia_android_framework', { | 15 [ 'skia_android_framework', { |
16 'dependencies': [ 'android_deps.gyp:png' ], | 16 'dependencies': [ 'android_deps.gyp:png' ], |
17 'export_dependent_settings': [ 'android_deps.gyp:png' ], | 17 'export_dependent_settings': [ 'android_deps.gyp:png' ], |
18 },{ | 18 },{ |
19 'dependencies': [ 'libpng.gyp:libpng_static' ], | 19 'dependencies': [ 'libpng.gyp:libpng_static' ], |
20 'export_dependent_settings': [ 'libpng.gyp:libpng_static' ], | 20 'export_dependent_settings': [ 'libpng.gyp:libpng_static' ], |
21 }] | 21 }] |
22 ] | 22 ] |
23 }, | 23 }, |
24 { | 24 { |
25 'target_name': 'libpng_static', | 25 'target_name': 'libpng_static', |
26 'type': 'static_library', | 26 'type': 'static_library', |
27 'standalone_static_library': 1, | 27 'standalone_static_library': 1, |
28 'include_dirs': [ | 28 'include_dirs': [ |
29 # Needed for generated pnglibconf.h and pngprefix.h | |
30 '../third_party/libpng', | 29 '../third_party/libpng', |
31 '../third_party/externals/libpng', | |
32 ], | 30 ], |
33 'dependencies': [ | 31 'dependencies': [ |
34 'zlib.gyp:zlib', | 32 'zlib.gyp:zlib', |
35 ], | 33 ], |
36 'export_dependent_settings': [ | 34 'export_dependent_settings': [ |
37 'zlib.gyp:zlib', | 35 'zlib.gyp:zlib', |
38 ], | 36 ], |
39 'direct_dependent_settings': { | 37 'direct_dependent_settings': { |
40 'include_dirs': [ | 38 'include_dirs': [ |
41 '../third_party/externals/libpng', | |
42 # Needed for generated pnglibconf.h and pngprefix.h | |
43 '../third_party/libpng', | 39 '../third_party/libpng', |
44 ], | 40 ], |
45 }, | 41 }, |
46 'cflags': [ | 42 'cflags': [ |
47 '-w', | 43 '-w', |
48 '-fvisibility=hidden', | 44 '-fvisibility=hidden', |
49 ], | 45 ], |
50 'sources': [ | 46 'sources': [ |
51 '../third_party/externals/libpng/png.c', | 47 '../third_party/libpng/png.c', |
52 '../third_party/externals/libpng/pngerror.c', | 48 '../third_party/libpng/pngerror.c', |
53 '../third_party/externals/libpng/pngget.c', | 49 '../third_party/libpng/pngget.c', |
54 '../third_party/externals/libpng/pngmem.c', | 50 '../third_party/libpng/pngmem.c', |
55 '../third_party/externals/libpng/pngpread.c', | 51 '../third_party/libpng/pngpread.c', |
56 '../third_party/externals/libpng/pngread.c', | 52 '../third_party/libpng/pngread.c', |
57 '../third_party/externals/libpng/pngrio.c', | 53 '../third_party/libpng/pngrio.c', |
58 '../third_party/externals/libpng/pngrtran.c', | 54 '../third_party/libpng/pngrtran.c', |
59 '../third_party/externals/libpng/pngrutil.c', | 55 '../third_party/libpng/pngrutil.c', |
60 '../third_party/externals/libpng/pngset.c', | 56 '../third_party/libpng/pngset.c', |
61 '../third_party/externals/libpng/pngtrans.c', | 57 '../third_party/libpng/pngtrans.c', |
62 '../third_party/externals/libpng/pngwio.c', | 58 '../third_party/libpng/pngwio.c', |
63 '../third_party/externals/libpng/pngwrite.c', | 59 '../third_party/libpng/pngwrite.c', |
64 '../third_party/externals/libpng/pngwtran.c', | 60 '../third_party/libpng/pngwtran.c', |
65 '../third_party/externals/libpng/pngwutil.c', | 61 '../third_party/libpng/pngwutil.c', |
66 ], | 62 ], |
67 'conditions': [ | 63 'conditions': [ |
68 [ '"x86" in skia_arch_type', { | 64 [ '"x86" in skia_arch_type', { |
69 'defines': [ | 65 'defines': [ |
70 'PNG_INTEL_SSE_OPT=1', | 66 'PNG_INTEL_SSE_OPT=1', |
71 ], | 67 ], |
72 'sources': [ | 68 'sources': [ |
73 '../third_party/externals/libpng/contrib/intel/intel_init.c', | 69 '../third_party/libpng/contrib/intel/intel_init.c', |
74 '../third_party/externals/libpng/contrib/intel/filter_sse2_intrinsic
s.c', | 70 '../third_party/libpng/contrib/intel/filter_sse2_intrinsics.c', |
75 ], | 71 ], |
76 }], | 72 }], |
77 [ '(("arm64" == skia_arch_type) or \ | 73 [ '(("arm64" == skia_arch_type) or \ |
78 ("arm" == skia_arch_type and arm_neon == 1)) and \ | 74 ("arm" == skia_arch_type and arm_neon == 1)) and \ |
79 ("ios" != skia_os)', { | 75 ("ios" != skia_os)', { |
80 'defines': [ | 76 'defines': [ |
81 'PNG_ARM_NEON_OPT=2', | 77 'PNG_ARM_NEON_OPT=2', |
82 'PNG_ARM_NEON_IMPLEMENTATION=1', | 78 'PNG_ARM_NEON_IMPLEMENTATION=1', |
83 ], | 79 ], |
84 'sources': [ | 80 'sources': [ |
85 '../third_party/externals/libpng/arm/arm_init.c', | 81 '../third_party/libpng/arm/arm_init.c', |
86 '../third_party/externals/libpng/arm/filter_neon_intrinsics.c', | 82 '../third_party/libpng/arm/filter_neon_intrinsics.c', |
87 ], | 83 ], |
88 }], | 84 }], |
89 [ '"ios" == skia_os', { | 85 [ '"ios" == skia_os', { |
90 'defines': [ | 86 'defines': [ |
91 'PNG_ARM_NEON_OPT=0', | 87 'PNG_ARM_NEON_OPT=0', |
92 ], | 88 ], |
93 }], | 89 }], |
94 ], | 90 ], |
95 } | 91 } |
96 ] | 92 ] |
97 } | 93 } |
OLD | NEW |