blob: dc58459eaf0931b0929d2467ee2ac9daea28a813 [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': [
29 # Needed for generated pnglibconf.h and pngprefix.h
30 '../third_party/libpng',
31 '../third_party/externals/libpng',
32 ],
33 'dependencies': [
34 'zlib.gyp:zlib',
35 ],
36 'export_dependent_settings': [
37 'zlib.gyp:zlib',
38 ],
39 'direct_dependent_settings': {
40 'include_dirs': [
41 '../third_party/externals/libpng',
42 # Needed for generated pnglibconf.h and pngprefix.h
43 '../third_party/libpng',
44 ],
djsollenb2a6fe72015-04-03 12:35:27 -070045 },
46 'cflags': [
47 '-w',
48 '-fvisibility=hidden',
49 ],
50 'sources': [
51 '../third_party/externals/libpng/png.c',
52 '../third_party/externals/libpng/pngerror.c',
53 '../third_party/externals/libpng/pngget.c',
54 '../third_party/externals/libpng/pngmem.c',
55 '../third_party/externals/libpng/pngpread.c',
56 '../third_party/externals/libpng/pngread.c',
57 '../third_party/externals/libpng/pngrio.c',
58 '../third_party/externals/libpng/pngrtran.c',
59 '../third_party/externals/libpng/pngrutil.c',
60 '../third_party/externals/libpng/pngset.c',
61 '../third_party/externals/libpng/pngtrans.c',
62 '../third_party/externals/libpng/pngwio.c',
63 '../third_party/externals/libpng/pngwrite.c',
64 '../third_party/externals/libpng/pngwtran.c',
65 '../third_party/externals/libpng/pngwutil.c',
66 ],
67 'conditions': [
68 [ 'skia_os == "ios"', {
69 # explicitly disable looking for NEON on iOS builds
70 'defines': [
71 'PNG_ARM_NEON_OPT=0',
72 ],
mtkleina5114d72015-08-24 13:27:01 -070073 }, { # skia_os != "ios"
djsollenb2a6fe72015-04-03 12:35:27 -070074 'dependencies': [
75 'libpng.gyp:libpng_static_neon',
76 ],
77 }],
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +000078 ],
79 },
djsollenb2a6fe72015-04-03 12:35:27 -070080 {
81 'target_name': 'libpng_static_neon',
82 'type': 'static_library',
83 'include_dirs': [
84 # Needed for generated pnglibconf.h and pngprefix.h
85 '../third_party/libpng',
86 '../third_party/externals/libpng',
87 ],
88 'dependencies': [
89 'zlib.gyp:zlib',
90 ],
91 'sources': [
92 '../third_party/externals/libpng/arm/arm_init.c',
93 '../third_party/externals/libpng/arm/filter_neon.S',
94 '../third_party/externals/libpng/arm/filter_neon_intrinsics.c',
95 ],
96 'conditions': [
97 ['arm_neon_optional', {
98 'cflags': [
99 '-mfpu=neon',
100 ],
101 }],
102 ],
103 }
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +0000104 ]
105}