blob: e20f0049b01bce76457fa589e091b98a4270a787 [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': {
7 'use_system_libwebp%': 0,
8 },
9 'conditions': [
10 ['use_system_libwebp==0', {
11 'targets': [
12 {
13 'target_name': 'libwebp_dec',
14 'type': 'static_library',
15 'include_dirs': [
16 '../third_party/externals/libwebp',
17 ],
18 'sources': [
19 '../third_party/externals/libwebp/dec/alpha.c',
20 '../third_party/externals/libwebp/dec/buffer.c',
21 '../third_party/externals/libwebp/dec/frame.c',
22 '../third_party/externals/libwebp/dec/idec.c',
23 '../third_party/externals/libwebp/dec/io.c',
24 '../third_party/externals/libwebp/dec/layer.c',
25 '../third_party/externals/libwebp/dec/quant.c',
26 '../third_party/externals/libwebp/dec/tree.c',
27 '../third_party/externals/libwebp/dec/vp8.c',
28 '../third_party/externals/libwebp/dec/vp8l.c',
29 '../third_party/externals/libwebp/dec/webp.c',
30 ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000031 },
32 {
33 'target_name': 'libwebp_dsp',
34 'type': 'static_library',
35 'include_dirs': [
36 '../third_party/externals/libwebp',
37 ],
38 'sources': [
39 '../third_party/externals/libwebp/dsp/cpu.c',
40 '../third_party/externals/libwebp/dsp/dec.c',
41 '../third_party/externals/libwebp/dsp/dec_sse2.c',
42 '../third_party/externals/libwebp/dsp/enc.c',
43 '../third_party/externals/libwebp/dsp/enc_sse2.c',
44 '../third_party/externals/libwebp/dsp/lossless.c',
45 '../third_party/externals/libwebp/dsp/upsampling.c',
46 '../third_party/externals/libwebp/dsp/upsampling_sse2.c',
47 '../third_party/externals/libwebp/dsp/yuv.c',
48 ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000049 'conditions': [
50 ['skia_os == "android"', {
51 'dependencies' : [
52 'android_deps.gyp:cpu_features',
53 ],
54 }],
55 ],
56 },
57 {
58 'target_name': 'libwebp_dsp_neon',
59 'conditions': [
60 ['armv7 == 1', {
61 'type': 'static_library',
62 'include_dirs': [
63 '../third_party/externals/libwebp',
64 ],
65 'sources': [
66 '../third_party/externals/libwebp/dsp/dec_neon.c',
67 ],
68 # behavior similar dsp_neon.c.neon in an Android.mk
skia.committer@gmail.comc49cabf2013-03-15 07:05:19 +000069 'cflags!': [
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000070 '-mfpu=vfpv3-d16',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000071 ],
72 'cflags': [ '-mfpu=neon' ],
73 },{ # "armv7 != 1"
74 'type': 'none',
75 }],
76 ],
77 },
78 {
79 'target_name': 'libwebp_enc',
80 'type': 'static_library',
81 'include_dirs': [
82 '../third_party/externals/libwebp',
83 ],
84 'sources': [
85 '../third_party/externals/libwebp/enc/alpha.c',
86 '../third_party/externals/libwebp/enc/analysis.c',
87 '../third_party/externals/libwebp/enc/backward_references.c',
88 '../third_party/externals/libwebp/enc/config.c',
89 '../third_party/externals/libwebp/enc/cost.c',
90 '../third_party/externals/libwebp/enc/filter.c',
91 '../third_party/externals/libwebp/enc/frame.c',
92 '../third_party/externals/libwebp/enc/histogram.c',
93 '../third_party/externals/libwebp/enc/iterator.c',
94 '../third_party/externals/libwebp/enc/layer.c',
95 '../third_party/externals/libwebp/enc/picture.c',
96 '../third_party/externals/libwebp/enc/quant.c',
97 '../third_party/externals/libwebp/enc/syntax.c',
98 '../third_party/externals/libwebp/enc/tree.c',
99 '../third_party/externals/libwebp/enc/vp8l.c',
100 '../third_party/externals/libwebp/enc/webpenc.c',
101 ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000102 },
103 {
104 'target_name': 'libwebp_utils',
105 'type': 'static_library',
106 'include_dirs': [
107 '../third_party/externals/libwebp',
108 ],
109 'sources': [
110 '../third_party/externals/libwebp/utils/bit_reader.c',
111 '../third_party/externals/libwebp/utils/bit_writer.c',
112 '../third_party/externals/libwebp/utils/color_cache.c',
113 '../third_party/externals/libwebp/utils/filters.c',
114 '../third_party/externals/libwebp/utils/huffman.c',
115 '../third_party/externals/libwebp/utils/huffman_encode.c',
116 '../third_party/externals/libwebp/utils/quant_levels.c',
117 '../third_party/externals/libwebp/utils/rescaler.c',
118 '../third_party/externals/libwebp/utils/thread.c',
119 '../third_party/externals/libwebp/utils/utils.c',
120 ],
commit-bot@chromium.orga936e372013-03-14 14:42:18 +0000121 },
122 {
123 'target_name': 'libwebp',
124 'type': 'none',
125 'dependencies' : [
126 'libwebp_dec',
127 'libwebp_dsp',
128 'libwebp_dsp_neon',
129 'libwebp_enc',
130 'libwebp_utils',
131 ],
132 'direct_dependent_settings': {
133 'include_dirs': [
134 '../third_party/externals/libwebp',
135 ],
136 },
137 'conditions': [
138 ['OS!="win"', {'product_name': 'webp'}],
139 ],
140 },
141 ],
142 }, {
143 'targets': [
144 {
145 'target_name': 'libwebp',
146 'type': 'none',
147 'direct_dependent_settings': {
148 'defines': [
149 'ENABLE_WEBP',
150 ],
151 },
152 'link_settings': {
153 'libraries': [
154 '-lwebp',
155 ],
156 },
157 }
158 ],
159 }],
160 ],
161}