blob: cff74f6c55f54f6d5e568bc0b5daacdab0eec880 [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',
djsollen@google.com42416ee2013-06-10 15:19:33 +000090 '../third_party/externals/libwebp/src/dsp/upsampling.c',
scroggof174e922015-10-01 10:56:08 -070091 '../third_party/externals/libwebp/src/dsp/upsampling_mips_dsp_r2.c',
djsollen@google.com42416ee2013-06-10 15:19:33 +000092 '../third_party/externals/libwebp/src/dsp/upsampling_sse2.c',
93 '../third_party/externals/libwebp/src/dsp/yuv.c',
scroggof174e922015-10-01 10:56:08 -070094 '../third_party/externals/libwebp/src/dsp/yuv_mips32.c',
95 '../third_party/externals/libwebp/src/dsp/yuv_mips_dsp_r2.c',
scroggo139491f2015-07-10 09:32:09 -070096 '../third_party/externals/libwebp/src/dsp/yuv_sse2.c',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000097 ],
commit-bot@chromium.org4324c3b2014-02-21 20:11:42 +000098 'cflags': [ '-w' ],
mtklein2bb034a2014-12-15 12:59:07 -080099 'xcode_settings': { 'WARNING_CFLAGS': [ '-w' ] },
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000100 'conditions': [
101 ['skia_os == "android"', {
102 'dependencies' : [
103 'android_deps.gyp:cpu_features',
104 ],
105 }],
106 ],
107 },
108 {
109 'target_name': 'libwebp_dsp_neon',
scroggo139491f2015-07-10 09:32:09 -0700110 'includes': [
111 'libwebp_skia.gypi',
112 ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000113 'conditions': [
scroggo139491f2015-07-10 09:32:09 -0700114 ['arm_version == 7', {
115 'cflags': [ '-mfpu=neon' ],
116 }],
djsollen@google.comf7542ba2013-07-31 12:57:27 +0000117 ['arm_version >= 7', {
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000118 'type': 'static_library',
119 'include_dirs': [
120 '../third_party/externals/libwebp',
121 ],
122 'sources': [
djsollen@google.com42416ee2013-06-10 15:19:33 +0000123 '../third_party/externals/libwebp/src/dsp/dec_neon.c',
djsollen@google.com110aff22013-06-10 16:50:18 +0000124 '../third_party/externals/libwebp/src/dsp/enc_neon.c',
scroggo139491f2015-07-10 09:32:09 -0700125 '../third_party/externals/libwebp/src/dsp/lossless_neon.c',
scroggof174e922015-10-01 10:56:08 -0700126 '../third_party/externals/libwebp/src/dsp/lossless_enc_neon.c',
djsollen@google.com110aff22013-06-10 16:50:18 +0000127 '../third_party/externals/libwebp/src/dsp/upsampling_neon.c',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000128 ],
129 # behavior similar dsp_neon.c.neon in an Android.mk
skia.committer@gmail.comc49cabf2013-03-15 07:05:19 +0000130 'cflags!': [
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000131 '-mfpu=vfpv3-d16',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000132 ],
scroggo139491f2015-07-10 09:32:09 -0700133 'cflags': [ '-w' ],
djsollen@google.comf7542ba2013-07-31 12:57:27 +0000134 },{ # !(arm_version >= 7)
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000135 'type': 'none',
136 }],
137 ],
138 },
139 {
scroggof174e922015-10-01 10:56:08 -0700140 'target_name': 'libwebp_dsp_enc',
141 'type': 'static_library',
142 'includes': [
143 'libwebp_skia.gypi',
144 ],
145 'include_dirs': [
146 '../third_party/externals/libwebp',
147 ],
148 'sources': [
149 '../third_party/externals/libwebp/src/dsp/argb.c',
150 '../third_party/externals/libwebp/src/dsp/argb_mips_dsp_r2.c',
151 '../third_party/externals/libwebp/src/dsp/argb_sse2.c',
152 '../third_party/externals/libwebp/src/dsp/cost.c',
153 '../third_party/externals/libwebp/src/dsp/cost_mips32.c',
154 '../third_party/externals/libwebp/src/dsp/cost_mips_dsp_r2.c',
155 '../third_party/externals/libwebp/src/dsp/cost_sse2.c',
156 '../third_party/externals/libwebp/src/dsp/enc_avx2.c',
157 '../third_party/externals/libwebp/src/dsp/enc_mips32.c',
158 '../third_party/externals/libwebp/src/dsp/enc_mips_dsp_r2.c',
159 '../third_party/externals/libwebp/src/dsp/enc_sse41.c',
160 '../third_party/externals/libwebp/src/dsp/lossless_enc.c',
161 '../third_party/externals/libwebp/src/dsp/lossless_enc_mips32.c',
162 '../third_party/externals/libwebp/src/dsp/lossless_enc_mips_dsp_r2.c',
163 '../third_party/externals/libwebp/src/dsp/lossless_enc_sse2.c',
164 '../third_party/externals/libwebp/src/dsp/lossless_enc_sse41.c',
165 ],
166 },
167 {
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000168 'target_name': 'libwebp_enc',
169 'type': 'static_library',
scroggo139491f2015-07-10 09:32:09 -0700170 'includes': [
171 'libwebp_skia.gypi',
172 ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000173 'include_dirs': [
174 '../third_party/externals/libwebp',
175 ],
scroggof174e922015-10-01 10:56:08 -0700176 'dependencies' : [
177 'libwebp_dsp_enc',
178 ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000179 'sources': [
djsollen@google.com42416ee2013-06-10 15:19:33 +0000180 '../third_party/externals/libwebp/src/enc/alpha.c',
181 '../third_party/externals/libwebp/src/enc/analysis.c',
182 '../third_party/externals/libwebp/src/enc/backward_references.c',
183 '../third_party/externals/libwebp/src/enc/config.c',
184 '../third_party/externals/libwebp/src/enc/cost.c',
185 '../third_party/externals/libwebp/src/enc/filter.c',
186 '../third_party/externals/libwebp/src/enc/frame.c',
187 '../third_party/externals/libwebp/src/enc/histogram.c',
188 '../third_party/externals/libwebp/src/enc/iterator.c',
scroggof174e922015-10-01 10:56:08 -0700189 '../third_party/externals/libwebp/src/enc/near_lossless.c',
djsollen@google.com42416ee2013-06-10 15:19:33 +0000190 '../third_party/externals/libwebp/src/enc/picture.c',
scroggo139491f2015-07-10 09:32:09 -0700191 '../third_party/externals/libwebp/src/enc/picture_csp.c',
scroggof174e922015-10-01 10:56:08 -0700192 '../third_party/externals/libwebp/src/enc/picture_psnr.c',
193 '../third_party/externals/libwebp/src/enc/picture_rescale.c',
194 '../third_party/externals/libwebp/src/enc/picture_tools.c',
djsollen@google.com42416ee2013-06-10 15:19:33 +0000195 '../third_party/externals/libwebp/src/enc/quant.c',
196 '../third_party/externals/libwebp/src/enc/syntax.c',
197 '../third_party/externals/libwebp/src/enc/token.c',
198 '../third_party/externals/libwebp/src/enc/tree.c',
199 '../third_party/externals/libwebp/src/enc/vp8l.c',
200 '../third_party/externals/libwebp/src/enc/webpenc.c',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000201 ],
commit-bot@chromium.orgea7e69a2013-10-28 22:05:12 +0000202 'cflags': [ '-w' ],
mtklein2bb034a2014-12-15 12:59:07 -0800203 'xcode_settings': { 'WARNING_CFLAGS': [ '-w' ] },
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000204 },
205 {
206 'target_name': 'libwebp_utils',
207 'type': 'static_library',
scroggo139491f2015-07-10 09:32:09 -0700208 'includes': [
209 'libwebp_skia.gypi',
210 ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000211 'include_dirs': [
212 '../third_party/externals/libwebp',
213 ],
214 'sources': [
djsollen@google.com42416ee2013-06-10 15:19:33 +0000215 '../third_party/externals/libwebp/src/utils/bit_reader.c',
216 '../third_party/externals/libwebp/src/utils/bit_writer.c',
217 '../third_party/externals/libwebp/src/utils/color_cache.c',
218 '../third_party/externals/libwebp/src/utils/filters.c',
219 '../third_party/externals/libwebp/src/utils/huffman.c',
220 '../third_party/externals/libwebp/src/utils/huffman_encode.c',
221 '../third_party/externals/libwebp/src/utils/quant_levels.c',
222 '../third_party/externals/libwebp/src/utils/quant_levels_dec.c',
scroggo139491f2015-07-10 09:32:09 -0700223 '../third_party/externals/libwebp/src/utils/random.c',
djsollen@google.com42416ee2013-06-10 15:19:33 +0000224 '../third_party/externals/libwebp/src/utils/rescaler.c',
225 '../third_party/externals/libwebp/src/utils/thread.c',
226 '../third_party/externals/libwebp/src/utils/utils.c',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000227 ],
commit-bot@chromium.org4324c3b2014-02-21 20:11:42 +0000228 'cflags': [ '-w' ],
mtklein2bb034a2014-12-15 12:59:07 -0800229 'xcode_settings': { 'WARNING_CFLAGS': [ '-w' ] },
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000230 },
231 {
232 'target_name': 'libwebp',
233 'type': 'none',
234 'dependencies' : [
235 'libwebp_dec',
djsollen@google.com42416ee2013-06-10 15:19:33 +0000236 'libwebp_demux',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000237 'libwebp_dsp',
238 'libwebp_dsp_neon',
239 'libwebp_enc',
240 'libwebp_utils',
241 ],
242 'direct_dependent_settings': {
243 'include_dirs': [
djsollen@google.com42416ee2013-06-10 15:19:33 +0000244 '../third_party/externals/libwebp/src',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000245 ],
246 },
247 'conditions': [
248 ['OS!="win"', {'product_name': 'webp'}],
249 ],
250 },
251 ],
252 }, {
scroggo139491f2015-07-10 09:32:09 -0700253 # use_system_libwebp == 1
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000254 'targets': [
255 {
256 'target_name': 'libwebp',
257 'type': 'none',
scroggo@google.comd4adfa32014-02-05 16:35:12 +0000258 'conditions': [
259 [ 'skia_android_framework', {
260 'direct_dependent_settings': {
261 'libraries': [
262 'libwebp-decode.a',
263 'libwebp-encode.a',
264 ],
265 'include_dirs': [
266 'external/webp/include',
267 ],
268 },
269 }, { # skia_android_framework == 0
270 'direct_dependent_settings': {
271 'defines': [
272 'ENABLE_WEBP',
273 ],
274 },
275 'link_settings': {
276 'libraries': [
277 '-lwebp',
278 ],
279 },
280 },
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000281 ],
scroggo@google.comd4adfa32014-02-05 16:35:12 +0000282 ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000283 }
284 ],
285 }],
286 ],
287}