blob: 50d90bceff13da6c2f19d370976db6c831150efb [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': {
mtklein170e00d2014-06-30 12:33:11 -07007 'skia_warnings_as_errors': 0,
scroggo@google.comd4adfa32014-02-05 16:35:12 +00008 'conditions':[
9 ['skia_android_framework == 1', {
10 'use_system_libwebp': 1,
11 }, {
12 'use_system_libwebp%': 0,
13 }],
14 ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000015 },
16 'conditions': [
17 ['use_system_libwebp==0', {
18 'targets': [
19 {
20 'target_name': 'libwebp_dec',
21 'type': 'static_library',
scroggo139491f2015-07-10 09:32:09 -070022 'includes': [
23 'libwebp_skia.gypi',
24 ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000025 'include_dirs': [
26 '../third_party/externals/libwebp',
27 ],
28 'sources': [
djsollen@google.com42416ee2013-06-10 15:19:33 +000029 '../third_party/externals/libwebp/src/dec/alpha.c',
30 '../third_party/externals/libwebp/src/dec/buffer.c',
31 '../third_party/externals/libwebp/src/dec/frame.c',
32 '../third_party/externals/libwebp/src/dec/idec.c',
33 '../third_party/externals/libwebp/src/dec/io.c',
djsollen@google.com42416ee2013-06-10 15:19:33 +000034 '../third_party/externals/libwebp/src/dec/quant.c',
35 '../third_party/externals/libwebp/src/dec/tree.c',
36 '../third_party/externals/libwebp/src/dec/vp8.c',
37 '../third_party/externals/libwebp/src/dec/vp8l.c',
38 '../third_party/externals/libwebp/src/dec/webp.c',
39 ],
commit-bot@chromium.org4324c3b2014-02-21 20:11:42 +000040 'cflags': [ '-w' ],
mtklein2bb034a2014-12-15 12:59:07 -080041 'xcode_settings': { 'WARNING_CFLAGS': [ '-w' ] },
djsollen@google.com42416ee2013-06-10 15:19:33 +000042 },
43 {
44 'target_name': 'libwebp_demux',
45 'type': 'static_library',
scroggo139491f2015-07-10 09:32:09 -070046 'includes': [
47 'libwebp_skia.gypi',
48 ],
djsollen@google.com42416ee2013-06-10 15:19:33 +000049 'include_dirs': [
50 '../third_party/externals/libwebp',
51 ],
52 'sources': [
53 '../third_party/externals/libwebp/src/demux/demux.c',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000054 ],
commit-bot@chromium.org4324c3b2014-02-21 20:11:42 +000055 'cflags': [ '-w' ],
mtklein2bb034a2014-12-15 12:59:07 -080056 'xcode_settings': { 'WARNING_CFLAGS': [ '-w' ] },
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000057 },
58 {
59 'target_name': 'libwebp_dsp',
60 'type': 'static_library',
scroggo139491f2015-07-10 09:32:09 -070061 'includes': [
62 'libwebp_skia.gypi',
63 ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000064 'include_dirs': [
65 '../third_party/externals/libwebp',
66 ],
67 'sources': [
scroggo139491f2015-07-10 09:32:09 -070068 '../third_party/externals/libwebp/src/dsp/alpha_processing.c',
scroggof174e922015-10-01 10:56:08 -070069 '../third_party/externals/libwebp/src/dsp/alpha_processing_mips_dsp_r2.c',
scroggo139491f2015-07-10 09:32:09 -070070 '../third_party/externals/libwebp/src/dsp/alpha_processing_sse2.c',
scroggof174e922015-10-01 10:56:08 -070071 '../third_party/externals/libwebp/src/dsp/alpha_processing_sse41.c',
djsollen@google.com42416ee2013-06-10 15:19:33 +000072 '../third_party/externals/libwebp/src/dsp/cpu.c',
73 '../third_party/externals/libwebp/src/dsp/dec.c',
scroggo139491f2015-07-10 09:32:09 -070074 '../third_party/externals/libwebp/src/dsp/dec_clip_tables.c',
scroggof174e922015-10-01 10:56:08 -070075 '../third_party/externals/libwebp/src/dsp/dec_mips32.c',
76 '../third_party/externals/libwebp/src/dsp/dec_mips_dsp_r2.c',
djsollen@google.com42416ee2013-06-10 15:19:33 +000077 '../third_party/externals/libwebp/src/dsp/dec_sse2.c',
scroggof174e922015-10-01 10:56:08 -070078 '../third_party/externals/libwebp/src/dsp/dec_sse41.c',
djsollen@google.com42416ee2013-06-10 15:19:33 +000079 '../third_party/externals/libwebp/src/dsp/enc.c',
80 '../third_party/externals/libwebp/src/dsp/enc_sse2.c',
scroggof174e922015-10-01 10:56:08 -070081 '../third_party/externals/libwebp/src/dsp/filters.c',
82 '../third_party/externals/libwebp/src/dsp/filters_mips_dsp_r2.c',
83 '../third_party/externals/libwebp/src/dsp/filters_sse2.c',
djsollen@google.com42416ee2013-06-10 15:19:33 +000084 '../third_party/externals/libwebp/src/dsp/lossless.c',
scroggof174e922015-10-01 10:56:08 -070085 '../third_party/externals/libwebp/src/dsp/lossless_mips_dsp_r2.c',
scroggo139491f2015-07-10 09:32:09 -070086 '../third_party/externals/libwebp/src/dsp/lossless_sse2.c',
scroggof174e922015-10-01 10:56:08 -070087 '../third_party/externals/libwebp/src/dsp/rescaler.c',
88 '../third_party/externals/libwebp/src/dsp/rescaler_mips32.c',
89 '../third_party/externals/libwebp/src/dsp/rescaler_mips_dsp_r2.c',
scroggo0ac723b2016-01-22 06:58:27 -080090 '../third_party/externals/libwebp/src/dsp/rescaler_sse2.c',
djsollen@google.com42416ee2013-06-10 15:19:33 +000091 '../third_party/externals/libwebp/src/dsp/upsampling.c',
scroggof174e922015-10-01 10:56:08 -070092 '../third_party/externals/libwebp/src/dsp/upsampling_mips_dsp_r2.c',
djsollen@google.com42416ee2013-06-10 15:19:33 +000093 '../third_party/externals/libwebp/src/dsp/upsampling_sse2.c',
94 '../third_party/externals/libwebp/src/dsp/yuv.c',
scroggof174e922015-10-01 10:56:08 -070095 '../third_party/externals/libwebp/src/dsp/yuv_mips32.c',
96 '../third_party/externals/libwebp/src/dsp/yuv_mips_dsp_r2.c',
scroggo139491f2015-07-10 09:32:09 -070097 '../third_party/externals/libwebp/src/dsp/yuv_sse2.c',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000098 ],
commit-bot@chromium.org4324c3b2014-02-21 20:11:42 +000099 'cflags': [ '-w' ],
mtklein2bb034a2014-12-15 12:59:07 -0800100 'xcode_settings': { 'WARNING_CFLAGS': [ '-w' ] },
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000101 'conditions': [
102 ['skia_os == "android"', {
103 'dependencies' : [
104 'android_deps.gyp:cpu_features',
105 ],
106 }],
107 ],
108 },
109 {
110 'target_name': 'libwebp_dsp_neon',
scroggo139491f2015-07-10 09:32:09 -0700111 'includes': [
112 'libwebp_skia.gypi',
113 ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000114 'conditions': [
scroggo139491f2015-07-10 09:32:09 -0700115 ['arm_version == 7', {
116 'cflags': [ '-mfpu=neon' ],
117 }],
djsollen@google.comf7542ba2013-07-31 12:57:27 +0000118 ['arm_version >= 7', {
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000119 'type': 'static_library',
120 'include_dirs': [
121 '../third_party/externals/libwebp',
122 ],
123 'sources': [
djsollen@google.com42416ee2013-06-10 15:19:33 +0000124 '../third_party/externals/libwebp/src/dsp/dec_neon.c',
djsollen@google.com110aff22013-06-10 16:50:18 +0000125 '../third_party/externals/libwebp/src/dsp/enc_neon.c',
scroggo139491f2015-07-10 09:32:09 -0700126 '../third_party/externals/libwebp/src/dsp/lossless_neon.c',
scroggof174e922015-10-01 10:56:08 -0700127 '../third_party/externals/libwebp/src/dsp/lossless_enc_neon.c',
scroggo0ac723b2016-01-22 06:58:27 -0800128 '../third_party/externals/libwebp/src/dsp/rescaler_neon.c',
djsollen@google.com110aff22013-06-10 16:50:18 +0000129 '../third_party/externals/libwebp/src/dsp/upsampling_neon.c',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000130 ],
131 # behavior similar dsp_neon.c.neon in an Android.mk
skia.committer@gmail.comc49cabf2013-03-15 07:05:19 +0000132 'cflags!': [
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000133 '-mfpu=vfpv3-d16',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000134 ],
scroggo139491f2015-07-10 09:32:09 -0700135 'cflags': [ '-w' ],
djsollen@google.comf7542ba2013-07-31 12:57:27 +0000136 },{ # !(arm_version >= 7)
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000137 'type': 'none',
138 }],
139 ],
140 },
141 {
scroggof174e922015-10-01 10:56:08 -0700142 'target_name': 'libwebp_dsp_enc',
143 'type': 'static_library',
144 'includes': [
145 'libwebp_skia.gypi',
146 ],
147 'include_dirs': [
148 '../third_party/externals/libwebp',
149 ],
150 'sources': [
151 '../third_party/externals/libwebp/src/dsp/argb.c',
152 '../third_party/externals/libwebp/src/dsp/argb_mips_dsp_r2.c',
153 '../third_party/externals/libwebp/src/dsp/argb_sse2.c',
154 '../third_party/externals/libwebp/src/dsp/cost.c',
155 '../third_party/externals/libwebp/src/dsp/cost_mips32.c',
156 '../third_party/externals/libwebp/src/dsp/cost_mips_dsp_r2.c',
157 '../third_party/externals/libwebp/src/dsp/cost_sse2.c',
158 '../third_party/externals/libwebp/src/dsp/enc_avx2.c',
159 '../third_party/externals/libwebp/src/dsp/enc_mips32.c',
160 '../third_party/externals/libwebp/src/dsp/enc_mips_dsp_r2.c',
161 '../third_party/externals/libwebp/src/dsp/enc_sse41.c',
162 '../third_party/externals/libwebp/src/dsp/lossless_enc.c',
163 '../third_party/externals/libwebp/src/dsp/lossless_enc_mips32.c',
164 '../third_party/externals/libwebp/src/dsp/lossless_enc_mips_dsp_r2.c',
165 '../third_party/externals/libwebp/src/dsp/lossless_enc_sse2.c',
166 '../third_party/externals/libwebp/src/dsp/lossless_enc_sse41.c',
167 ],
168 },
169 {
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000170 'target_name': 'libwebp_enc',
171 'type': 'static_library',
scroggo139491f2015-07-10 09:32:09 -0700172 'includes': [
173 'libwebp_skia.gypi',
174 ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000175 'include_dirs': [
176 '../third_party/externals/libwebp',
177 ],
scroggof174e922015-10-01 10:56:08 -0700178 'dependencies' : [
179 'libwebp_dsp_enc',
180 ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000181 'sources': [
djsollen@google.com42416ee2013-06-10 15:19:33 +0000182 '../third_party/externals/libwebp/src/enc/alpha.c',
183 '../third_party/externals/libwebp/src/enc/analysis.c',
184 '../third_party/externals/libwebp/src/enc/backward_references.c',
185 '../third_party/externals/libwebp/src/enc/config.c',
186 '../third_party/externals/libwebp/src/enc/cost.c',
187 '../third_party/externals/libwebp/src/enc/filter.c',
188 '../third_party/externals/libwebp/src/enc/frame.c',
189 '../third_party/externals/libwebp/src/enc/histogram.c',
190 '../third_party/externals/libwebp/src/enc/iterator.c',
scroggof174e922015-10-01 10:56:08 -0700191 '../third_party/externals/libwebp/src/enc/near_lossless.c',
djsollen@google.com42416ee2013-06-10 15:19:33 +0000192 '../third_party/externals/libwebp/src/enc/picture.c',
scroggo139491f2015-07-10 09:32:09 -0700193 '../third_party/externals/libwebp/src/enc/picture_csp.c',
scroggof174e922015-10-01 10:56:08 -0700194 '../third_party/externals/libwebp/src/enc/picture_psnr.c',
195 '../third_party/externals/libwebp/src/enc/picture_rescale.c',
196 '../third_party/externals/libwebp/src/enc/picture_tools.c',
djsollen@google.com42416ee2013-06-10 15:19:33 +0000197 '../third_party/externals/libwebp/src/enc/quant.c',
198 '../third_party/externals/libwebp/src/enc/syntax.c',
199 '../third_party/externals/libwebp/src/enc/token.c',
200 '../third_party/externals/libwebp/src/enc/tree.c',
201 '../third_party/externals/libwebp/src/enc/vp8l.c',
202 '../third_party/externals/libwebp/src/enc/webpenc.c',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000203 ],
commit-bot@chromium.orgea7e69a2013-10-28 22:05:12 +0000204 'cflags': [ '-w' ],
mtklein2bb034a2014-12-15 12:59:07 -0800205 'xcode_settings': { 'WARNING_CFLAGS': [ '-w' ] },
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000206 },
207 {
208 'target_name': 'libwebp_utils',
209 'type': 'static_library',
scroggo139491f2015-07-10 09:32:09 -0700210 'includes': [
211 'libwebp_skia.gypi',
212 ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000213 'include_dirs': [
214 '../third_party/externals/libwebp',
215 ],
216 'sources': [
djsollen@google.com42416ee2013-06-10 15:19:33 +0000217 '../third_party/externals/libwebp/src/utils/bit_reader.c',
218 '../third_party/externals/libwebp/src/utils/bit_writer.c',
219 '../third_party/externals/libwebp/src/utils/color_cache.c',
220 '../third_party/externals/libwebp/src/utils/filters.c',
221 '../third_party/externals/libwebp/src/utils/huffman.c',
222 '../third_party/externals/libwebp/src/utils/huffman_encode.c',
223 '../third_party/externals/libwebp/src/utils/quant_levels.c',
224 '../third_party/externals/libwebp/src/utils/quant_levels_dec.c',
scroggo139491f2015-07-10 09:32:09 -0700225 '../third_party/externals/libwebp/src/utils/random.c',
djsollen@google.com42416ee2013-06-10 15:19:33 +0000226 '../third_party/externals/libwebp/src/utils/rescaler.c',
227 '../third_party/externals/libwebp/src/utils/thread.c',
228 '../third_party/externals/libwebp/src/utils/utils.c',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000229 ],
commit-bot@chromium.org4324c3b2014-02-21 20:11:42 +0000230 'cflags': [ '-w' ],
mtklein2bb034a2014-12-15 12:59:07 -0800231 'xcode_settings': { 'WARNING_CFLAGS': [ '-w' ] },
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000232 },
233 {
234 'target_name': 'libwebp',
235 'type': 'none',
236 'dependencies' : [
237 'libwebp_dec',
djsollen@google.com42416ee2013-06-10 15:19:33 +0000238 'libwebp_demux',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000239 'libwebp_dsp',
240 'libwebp_dsp_neon',
241 'libwebp_enc',
242 'libwebp_utils',
243 ],
244 'direct_dependent_settings': {
245 'include_dirs': [
djsollen@google.com42416ee2013-06-10 15:19:33 +0000246 '../third_party/externals/libwebp/src',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000247 ],
248 },
249 'conditions': [
250 ['OS!="win"', {'product_name': 'webp'}],
251 ],
252 },
253 ],
254 }, {
scroggo139491f2015-07-10 09:32:09 -0700255 # use_system_libwebp == 1
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000256 'targets': [
257 {
258 'target_name': 'libwebp',
259 'type': 'none',
scroggo@google.comd4adfa32014-02-05 16:35:12 +0000260 'conditions': [
261 [ 'skia_android_framework', {
262 'direct_dependent_settings': {
263 'libraries': [
264 'libwebp-decode.a',
265 'libwebp-encode.a',
266 ],
267 'include_dirs': [
268 'external/webp/include',
269 ],
270 },
271 }, { # skia_android_framework == 0
272 'direct_dependent_settings': {
273 'defines': [
274 'ENABLE_WEBP',
275 ],
276 },
277 'link_settings': {
278 'libraries': [
279 '-lwebp',
280 ],
281 },
282 },
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000283 ],
scroggo@google.comd4adfa32014-02-05 16:35:12 +0000284 ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000285 }
286 ],
287 }],
288 ],
289}