blob: 22a51ba13f42b3e17ab2e48e1159b2a9b70557b5 [file] [log] [blame]
commit-bot@chromium.orga936e372013-03-14 14:42:18 +00001# Copyright (c) 2012 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5{
6 'variables': {
scroggo@google.comd4adfa32014-02-05 16:35:12 +00007 'conditions':[
8 ['skia_android_framework == 1', {
9 'use_system_libwebp': 1,
10 }, {
11 'use_system_libwebp%': 0,
12 }],
13 ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000014 },
15 'conditions': [
16 ['use_system_libwebp==0', {
17 'targets': [
18 {
19 'target_name': 'libwebp_dec',
20 'type': 'static_library',
21 'include_dirs': [
22 '../third_party/externals/libwebp',
23 ],
24 'sources': [
djsollen@google.com42416ee2013-06-10 15:19:33 +000025 '../third_party/externals/libwebp/src/dec/alpha.c',
26 '../third_party/externals/libwebp/src/dec/buffer.c',
27 '../third_party/externals/libwebp/src/dec/frame.c',
28 '../third_party/externals/libwebp/src/dec/idec.c',
29 '../third_party/externals/libwebp/src/dec/io.c',
30 '../third_party/externals/libwebp/src/dec/layer.c',
31 '../third_party/externals/libwebp/src/dec/quant.c',
32 '../third_party/externals/libwebp/src/dec/tree.c',
33 '../third_party/externals/libwebp/src/dec/vp8.c',
34 '../third_party/externals/libwebp/src/dec/vp8l.c',
35 '../third_party/externals/libwebp/src/dec/webp.c',
36 ],
commit-bot@chromium.org4324c3b2014-02-21 20:11:42 +000037 'cflags': [ '-w' ],
djsollen@google.com42416ee2013-06-10 15:19:33 +000038 },
39 {
40 'target_name': 'libwebp_demux',
41 'type': 'static_library',
42 'include_dirs': [
43 '../third_party/externals/libwebp',
44 ],
45 'sources': [
46 '../third_party/externals/libwebp/src/demux/demux.c',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000047 ],
commit-bot@chromium.org4324c3b2014-02-21 20:11:42 +000048 'cflags': [ '-w' ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000049 },
50 {
51 'target_name': 'libwebp_dsp',
52 'type': 'static_library',
53 'include_dirs': [
54 '../third_party/externals/libwebp',
55 ],
56 'sources': [
djsollen@google.com42416ee2013-06-10 15:19:33 +000057 '../third_party/externals/libwebp/src/dsp/cpu.c',
58 '../third_party/externals/libwebp/src/dsp/dec.c',
59 '../third_party/externals/libwebp/src/dsp/dec_sse2.c',
60 '../third_party/externals/libwebp/src/dsp/enc.c',
61 '../third_party/externals/libwebp/src/dsp/enc_sse2.c',
62 '../third_party/externals/libwebp/src/dsp/lossless.c',
63 '../third_party/externals/libwebp/src/dsp/upsampling.c',
64 '../third_party/externals/libwebp/src/dsp/upsampling_sse2.c',
65 '../third_party/externals/libwebp/src/dsp/yuv.c',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000066 ],
commit-bot@chromium.org4324c3b2014-02-21 20:11:42 +000067 'cflags': [ '-w' ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000068 'conditions': [
69 ['skia_os == "android"', {
70 'dependencies' : [
71 'android_deps.gyp:cpu_features',
72 ],
73 }],
74 ],
75 },
76 {
77 'target_name': 'libwebp_dsp_neon',
78 'conditions': [
djsollen@google.comf7542ba2013-07-31 12:57:27 +000079 ['arm_version >= 7', {
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000080 'type': 'static_library',
81 'include_dirs': [
82 '../third_party/externals/libwebp',
83 ],
84 'sources': [
djsollen@google.com42416ee2013-06-10 15:19:33 +000085 '../third_party/externals/libwebp/src/dsp/dec_neon.c',
djsollen@google.com110aff22013-06-10 16:50:18 +000086 '../third_party/externals/libwebp/src/dsp/enc_neon.c',
87 '../third_party/externals/libwebp/src/dsp/upsampling_neon.c',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000088 ],
89 # behavior similar dsp_neon.c.neon in an Android.mk
skia.committer@gmail.comc49cabf2013-03-15 07:05:19 +000090 'cflags!': [
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000091 '-mfpu=vfpv3-d16',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000092 ],
commit-bot@chromium.org4324c3b2014-02-21 20:11:42 +000093 'cflags': [ '-mfpu=neon', '-w' ],
djsollen@google.comf7542ba2013-07-31 12:57:27 +000094 },{ # !(arm_version >= 7)
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000095 'type': 'none',
96 }],
97 ],
98 },
99 {
100 'target_name': 'libwebp_enc',
101 'type': 'static_library',
102 'include_dirs': [
103 '../third_party/externals/libwebp',
104 ],
105 'sources': [
djsollen@google.com42416ee2013-06-10 15:19:33 +0000106 '../third_party/externals/libwebp/src/enc/alpha.c',
107 '../third_party/externals/libwebp/src/enc/analysis.c',
108 '../third_party/externals/libwebp/src/enc/backward_references.c',
109 '../third_party/externals/libwebp/src/enc/config.c',
110 '../third_party/externals/libwebp/src/enc/cost.c',
111 '../third_party/externals/libwebp/src/enc/filter.c',
112 '../third_party/externals/libwebp/src/enc/frame.c',
113 '../third_party/externals/libwebp/src/enc/histogram.c',
114 '../third_party/externals/libwebp/src/enc/iterator.c',
115 '../third_party/externals/libwebp/src/enc/layer.c',
116 '../third_party/externals/libwebp/src/enc/picture.c',
117 '../third_party/externals/libwebp/src/enc/quant.c',
118 '../third_party/externals/libwebp/src/enc/syntax.c',
119 '../third_party/externals/libwebp/src/enc/token.c',
120 '../third_party/externals/libwebp/src/enc/tree.c',
121 '../third_party/externals/libwebp/src/enc/vp8l.c',
122 '../third_party/externals/libwebp/src/enc/webpenc.c',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000123 ],
commit-bot@chromium.orgea7e69a2013-10-28 22:05:12 +0000124 'cflags': [ '-w' ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000125 },
126 {
127 'target_name': 'libwebp_utils',
128 'type': 'static_library',
129 'include_dirs': [
130 '../third_party/externals/libwebp',
131 ],
132 'sources': [
djsollen@google.com42416ee2013-06-10 15:19:33 +0000133 '../third_party/externals/libwebp/src/utils/bit_reader.c',
134 '../third_party/externals/libwebp/src/utils/bit_writer.c',
135 '../third_party/externals/libwebp/src/utils/color_cache.c',
136 '../third_party/externals/libwebp/src/utils/filters.c',
137 '../third_party/externals/libwebp/src/utils/huffman.c',
138 '../third_party/externals/libwebp/src/utils/huffman_encode.c',
139 '../third_party/externals/libwebp/src/utils/quant_levels.c',
140 '../third_party/externals/libwebp/src/utils/quant_levels_dec.c',
141 '../third_party/externals/libwebp/src/utils/rescaler.c',
142 '../third_party/externals/libwebp/src/utils/thread.c',
143 '../third_party/externals/libwebp/src/utils/utils.c',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000144 ],
commit-bot@chromium.org4324c3b2014-02-21 20:11:42 +0000145 'cflags': [ '-w' ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000146 },
147 {
148 'target_name': 'libwebp',
149 'type': 'none',
150 'dependencies' : [
151 'libwebp_dec',
djsollen@google.com42416ee2013-06-10 15:19:33 +0000152 'libwebp_demux',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000153 'libwebp_dsp',
154 'libwebp_dsp_neon',
155 'libwebp_enc',
156 'libwebp_utils',
157 ],
158 'direct_dependent_settings': {
159 'include_dirs': [
djsollen@google.com42416ee2013-06-10 15:19:33 +0000160 '../third_party/externals/libwebp/src',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000161 ],
162 },
163 'conditions': [
164 ['OS!="win"', {'product_name': 'webp'}],
165 ],
166 },
167 ],
168 }, {
scroggo@google.comd4adfa32014-02-05 16:35:12 +0000169 # use_system_libwep == 1
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000170 'targets': [
171 {
172 'target_name': 'libwebp',
173 'type': 'none',
scroggo@google.comd4adfa32014-02-05 16:35:12 +0000174 'conditions': [
175 [ 'skia_android_framework', {
176 'direct_dependent_settings': {
177 'libraries': [
178 'libwebp-decode.a',
179 'libwebp-encode.a',
180 ],
181 'include_dirs': [
182 'external/webp/include',
183 ],
184 },
185 }, { # skia_android_framework == 0
186 'direct_dependent_settings': {
187 'defines': [
188 'ENABLE_WEBP',
189 ],
190 },
191 'link_settings': {
192 'libraries': [
193 '-lwebp',
194 ],
195 },
196 },
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000197 ],
scroggo@google.comd4adfa32014-02-05 16:35:12 +0000198 ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000199 }
200 ],
201 }],
202 ],
203}