blob: 0821db81942f22f9413b2ad430e7bba6354d9e01 [file] [log] [blame]
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +00001# 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',
djsollenb2a6fe72015-04-03 12:35:27 -070013 'type': 'none',
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +000014 'conditions': [
mtkleina5114d72015-08-24 13:27:01 -070015 [ '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 }]
djsollenb2a6fe72015-04-03 12:35:27 -070022 ]
23 },
24 {
25 'target_name': 'libpng_static',
26 'type': 'static_library',
27 'standalone_static_library': 1,
28 'include_dirs': [
djsollenb2a6fe72015-04-03 12:35:27 -070029 '../third_party/libpng',
djsollenb2a6fe72015-04-03 12:35:27 -070030 ],
31 'dependencies': [
32 'zlib.gyp:zlib',
33 ],
34 'export_dependent_settings': [
35 'zlib.gyp:zlib',
36 ],
37 'direct_dependent_settings': {
38 'include_dirs': [
djsollenb2a6fe72015-04-03 12:35:27 -070039 '../third_party/libpng',
40 ],
djsollenb2a6fe72015-04-03 12:35:27 -070041 },
42 'cflags': [
43 '-w',
44 '-fvisibility=hidden',
45 ],
46 'sources': [
scroggo39658252016-06-02 12:59:59 -070047 '../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',
djsollenb2a6fe72015-04-03 12:35:27 -070062 ],
63 'conditions': [
msarett740668d2016-02-19 11:14:43 -080064 [ '"x86" in skia_arch_type', {
djsollenb2a6fe72015-04-03 12:35:27 -070065 'defines': [
msarett740668d2016-02-19 11:14:43 -080066 'PNG_INTEL_SSE_OPT=1',
djsollenb2a6fe72015-04-03 12:35:27 -070067 ],
msarett740668d2016-02-19 11:14:43 -080068 'sources': [
scroggo39658252016-06-02 12:59:59 -070069 '../third_party/libpng/contrib/intel/intel_init.c',
70 '../third_party/libpng/contrib/intel/filter_sse2_intrinsics.c',
djsollenb2a6fe72015-04-03 12:35:27 -070071 ],
72 }],
msarett740668d2016-02-19 11:14:43 -080073 [ '(("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': [
scroggo39658252016-06-02 12:59:59 -070081 '../third_party/libpng/arm/arm_init.c',
82 '../third_party/libpng/arm/filter_neon_intrinsics.c',
msarett740668d2016-02-19 11:14:43 -080083 ],
84 }],
85 [ '"ios" == skia_os', {
86 'defines': [
87 'PNG_ARM_NEON_OPT=0',
djsollenb2a6fe72015-04-03 12:35:27 -070088 ],
89 }],
90 ],
91 }
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +000092 ]
93}