blob: d918f2d403db2c795fd1d74980d9f819b5190039 [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': [
djsollenb2a6fe72015-04-03 12:35:27 -070015 [ 'skia_os == "android"',
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +000016 {
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +000017 'dependencies': [
djsollenb2a6fe72015-04-03 12:35:27 -070018 'android_deps.gyp:png',
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +000019 ],
20 'export_dependent_settings': [
djsollenb2a6fe72015-04-03 12:35:27 -070021 'android_deps.gyp:png',
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +000022 ],
djsollenb2a6fe72015-04-03 12:35:27 -070023 }, { # skia_os != "android"
24 'dependencies': [
25 'libpng.gyp:libpng_static',
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +000026 ],
djsollenb2a6fe72015-04-03 12:35:27 -070027 'export_dependent_settings': [
28 'libpng.gyp:libpng_static',
scroggof24f2242015-03-03 08:59:20 -080029 ],
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +000030 }
31 ]
djsollenb2a6fe72015-04-03 12:35:27 -070032 ]
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 and pngprefix.h
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 and pngprefix.h
53 '../third_party/libpng',
54 ],
55 'defines': [
56 'SKIA_PNG_PREFIXED',
57 ],
58 },
59 'cflags': [
60 '-w',
61 '-fvisibility=hidden',
62 ],
63 'sources': [
64 '../third_party/externals/libpng/png.c',
65 '../third_party/externals/libpng/pngerror.c',
66 '../third_party/externals/libpng/pngget.c',
67 '../third_party/externals/libpng/pngmem.c',
68 '../third_party/externals/libpng/pngpread.c',
69 '../third_party/externals/libpng/pngread.c',
70 '../third_party/externals/libpng/pngrio.c',
71 '../third_party/externals/libpng/pngrtran.c',
72 '../third_party/externals/libpng/pngrutil.c',
73 '../third_party/externals/libpng/pngset.c',
74 '../third_party/externals/libpng/pngtrans.c',
75 '../third_party/externals/libpng/pngwio.c',
76 '../third_party/externals/libpng/pngwrite.c',
77 '../third_party/externals/libpng/pngwtran.c',
78 '../third_party/externals/libpng/pngwutil.c',
79 ],
80 'conditions': [
81 [ 'skia_os == "ios"', {
82 # explicitly disable looking for NEON on iOS builds
83 'defines': [
84 'PNG_ARM_NEON_OPT=0',
85 ],
86 }, { # skia_os != "ios"
87 'dependencies': [
88 'libpng.gyp:libpng_static_neon',
89 ],
90 }],
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +000091 ],
92 },
djsollenb2a6fe72015-04-03 12:35:27 -070093 {
94 'target_name': 'libpng_static_neon',
95 'type': 'static_library',
96 'include_dirs': [
97 # Needed for generated pnglibconf.h and pngprefix.h
98 '../third_party/libpng',
99 '../third_party/externals/libpng',
100 ],
101 'dependencies': [
102 'zlib.gyp:zlib',
103 ],
104 'sources': [
105 '../third_party/externals/libpng/arm/arm_init.c',
106 '../third_party/externals/libpng/arm/filter_neon.S',
107 '../third_party/externals/libpng/arm/filter_neon_intrinsics.c',
108 ],
109 'conditions': [
110 ['arm_neon_optional', {
111 'cflags': [
112 '-mfpu=neon',
113 ],
114 }],
115 ],
116 }
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +0000117 ]
118}