commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 1 | # 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': { |
mtklein | 170e00d | 2014-06-30 12:33:11 -0700 | [diff] [blame] | 7 | 'skia_warnings_as_errors': 0, |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 8 | 'conditions':[ |
| 9 | ['skia_android_framework == 1', { |
| 10 | 'use_system_libwebp': 1, |
| 11 | }, { |
| 12 | 'use_system_libwebp%': 0, |
| 13 | }], |
| 14 | ], |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 15 | }, |
| 16 | 'conditions': [ |
| 17 | ['use_system_libwebp==0', { |
| 18 | 'targets': [ |
| 19 | { |
| 20 | 'target_name': 'libwebp_dec', |
| 21 | 'type': 'static_library', |
| 22 | 'include_dirs': [ |
| 23 | '../third_party/externals/libwebp', |
| 24 | ], |
| 25 | 'sources': [ |
djsollen@google.com | 42416ee | 2013-06-10 15:19:33 +0000 | [diff] [blame] | 26 | '../third_party/externals/libwebp/src/dec/alpha.c', |
| 27 | '../third_party/externals/libwebp/src/dec/buffer.c', |
| 28 | '../third_party/externals/libwebp/src/dec/frame.c', |
| 29 | '../third_party/externals/libwebp/src/dec/idec.c', |
| 30 | '../third_party/externals/libwebp/src/dec/io.c', |
mtklein | 449998d | 2014-12-15 12:23:00 -0800 | [diff] [blame] | 31 | '../third_party/externals/libwebp/src/dec/layer.c', |
djsollen@google.com | 42416ee | 2013-06-10 15:19:33 +0000 | [diff] [blame] | 32 | '../third_party/externals/libwebp/src/dec/quant.c', |
| 33 | '../third_party/externals/libwebp/src/dec/tree.c', |
| 34 | '../third_party/externals/libwebp/src/dec/vp8.c', |
| 35 | '../third_party/externals/libwebp/src/dec/vp8l.c', |
| 36 | '../third_party/externals/libwebp/src/dec/webp.c', |
| 37 | ], |
commit-bot@chromium.org | 4324c3b | 2014-02-21 20:11:42 +0000 | [diff] [blame] | 38 | 'cflags': [ '-w' ], |
mtklein | 2bb034a | 2014-12-15 12:59:07 -0800 | [diff] [blame] | 39 | 'xcode_settings': { 'WARNING_CFLAGS': [ '-w' ] }, |
djsollen@google.com | 42416ee | 2013-06-10 15:19:33 +0000 | [diff] [blame] | 40 | }, |
| 41 | { |
| 42 | 'target_name': 'libwebp_demux', |
| 43 | 'type': 'static_library', |
| 44 | 'include_dirs': [ |
| 45 | '../third_party/externals/libwebp', |
| 46 | ], |
| 47 | 'sources': [ |
| 48 | '../third_party/externals/libwebp/src/demux/demux.c', |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 49 | ], |
commit-bot@chromium.org | 4324c3b | 2014-02-21 20:11:42 +0000 | [diff] [blame] | 50 | 'cflags': [ '-w' ], |
mtklein | 2bb034a | 2014-12-15 12:59:07 -0800 | [diff] [blame] | 51 | 'xcode_settings': { 'WARNING_CFLAGS': [ '-w' ] }, |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 52 | }, |
| 53 | { |
| 54 | 'target_name': 'libwebp_dsp', |
| 55 | 'type': 'static_library', |
| 56 | 'include_dirs': [ |
| 57 | '../third_party/externals/libwebp', |
| 58 | ], |
| 59 | 'sources': [ |
djsollen@google.com | 42416ee | 2013-06-10 15:19:33 +0000 | [diff] [blame] | 60 | '../third_party/externals/libwebp/src/dsp/cpu.c', |
| 61 | '../third_party/externals/libwebp/src/dsp/dec.c', |
| 62 | '../third_party/externals/libwebp/src/dsp/dec_sse2.c', |
| 63 | '../third_party/externals/libwebp/src/dsp/enc.c', |
| 64 | '../third_party/externals/libwebp/src/dsp/enc_sse2.c', |
| 65 | '../third_party/externals/libwebp/src/dsp/lossless.c', |
| 66 | '../third_party/externals/libwebp/src/dsp/upsampling.c', |
| 67 | '../third_party/externals/libwebp/src/dsp/upsampling_sse2.c', |
| 68 | '../third_party/externals/libwebp/src/dsp/yuv.c', |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 69 | ], |
commit-bot@chromium.org | 4324c3b | 2014-02-21 20:11:42 +0000 | [diff] [blame] | 70 | 'cflags': [ '-w' ], |
mtklein | 2bb034a | 2014-12-15 12:59:07 -0800 | [diff] [blame] | 71 | 'xcode_settings': { 'WARNING_CFLAGS': [ '-w' ] }, |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 72 | 'conditions': [ |
| 73 | ['skia_os == "android"', { |
| 74 | 'dependencies' : [ |
| 75 | 'android_deps.gyp:cpu_features', |
| 76 | ], |
| 77 | }], |
| 78 | ], |
| 79 | }, |
| 80 | { |
| 81 | 'target_name': 'libwebp_dsp_neon', |
| 82 | 'conditions': [ |
djsollen@google.com | f7542ba | 2013-07-31 12:57:27 +0000 | [diff] [blame] | 83 | ['arm_version >= 7', { |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 84 | 'type': 'static_library', |
| 85 | 'include_dirs': [ |
| 86 | '../third_party/externals/libwebp', |
| 87 | ], |
| 88 | 'sources': [ |
djsollen@google.com | 42416ee | 2013-06-10 15:19:33 +0000 | [diff] [blame] | 89 | '../third_party/externals/libwebp/src/dsp/dec_neon.c', |
djsollen@google.com | 110aff2 | 2013-06-10 16:50:18 +0000 | [diff] [blame] | 90 | '../third_party/externals/libwebp/src/dsp/enc_neon.c', |
| 91 | '../third_party/externals/libwebp/src/dsp/upsampling_neon.c', |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 92 | ], |
| 93 | # behavior similar dsp_neon.c.neon in an Android.mk |
skia.committer@gmail.com | c49cabf | 2013-03-15 07:05:19 +0000 | [diff] [blame] | 94 | 'cflags!': [ |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 95 | '-mfpu=vfpv3-d16', |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 96 | ], |
commit-bot@chromium.org | 4324c3b | 2014-02-21 20:11:42 +0000 | [diff] [blame] | 97 | 'cflags': [ '-mfpu=neon', '-w' ], |
djsollen@google.com | f7542ba | 2013-07-31 12:57:27 +0000 | [diff] [blame] | 98 | },{ # !(arm_version >= 7) |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 99 | 'type': 'none', |
| 100 | }], |
| 101 | ], |
| 102 | }, |
| 103 | { |
| 104 | 'target_name': 'libwebp_enc', |
| 105 | 'type': 'static_library', |
| 106 | 'include_dirs': [ |
| 107 | '../third_party/externals/libwebp', |
| 108 | ], |
| 109 | 'sources': [ |
djsollen@google.com | 42416ee | 2013-06-10 15:19:33 +0000 | [diff] [blame] | 110 | '../third_party/externals/libwebp/src/enc/alpha.c', |
| 111 | '../third_party/externals/libwebp/src/enc/analysis.c', |
| 112 | '../third_party/externals/libwebp/src/enc/backward_references.c', |
| 113 | '../third_party/externals/libwebp/src/enc/config.c', |
| 114 | '../third_party/externals/libwebp/src/enc/cost.c', |
| 115 | '../third_party/externals/libwebp/src/enc/filter.c', |
| 116 | '../third_party/externals/libwebp/src/enc/frame.c', |
| 117 | '../third_party/externals/libwebp/src/enc/histogram.c', |
| 118 | '../third_party/externals/libwebp/src/enc/iterator.c', |
mtklein | 449998d | 2014-12-15 12:23:00 -0800 | [diff] [blame] | 119 | '../third_party/externals/libwebp/src/enc/layer.c', |
djsollen@google.com | 42416ee | 2013-06-10 15:19:33 +0000 | [diff] [blame] | 120 | '../third_party/externals/libwebp/src/enc/picture.c', |
| 121 | '../third_party/externals/libwebp/src/enc/quant.c', |
| 122 | '../third_party/externals/libwebp/src/enc/syntax.c', |
| 123 | '../third_party/externals/libwebp/src/enc/token.c', |
| 124 | '../third_party/externals/libwebp/src/enc/tree.c', |
| 125 | '../third_party/externals/libwebp/src/enc/vp8l.c', |
| 126 | '../third_party/externals/libwebp/src/enc/webpenc.c', |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 127 | ], |
commit-bot@chromium.org | ea7e69a | 2013-10-28 22:05:12 +0000 | [diff] [blame] | 128 | 'cflags': [ '-w' ], |
mtklein | 2bb034a | 2014-12-15 12:59:07 -0800 | [diff] [blame] | 129 | 'xcode_settings': { 'WARNING_CFLAGS': [ '-w' ] }, |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 130 | }, |
| 131 | { |
| 132 | 'target_name': 'libwebp_utils', |
| 133 | 'type': 'static_library', |
| 134 | 'include_dirs': [ |
| 135 | '../third_party/externals/libwebp', |
| 136 | ], |
| 137 | 'sources': [ |
djsollen@google.com | 42416ee | 2013-06-10 15:19:33 +0000 | [diff] [blame] | 138 | '../third_party/externals/libwebp/src/utils/bit_reader.c', |
| 139 | '../third_party/externals/libwebp/src/utils/bit_writer.c', |
| 140 | '../third_party/externals/libwebp/src/utils/color_cache.c', |
| 141 | '../third_party/externals/libwebp/src/utils/filters.c', |
| 142 | '../third_party/externals/libwebp/src/utils/huffman.c', |
| 143 | '../third_party/externals/libwebp/src/utils/huffman_encode.c', |
| 144 | '../third_party/externals/libwebp/src/utils/quant_levels.c', |
| 145 | '../third_party/externals/libwebp/src/utils/quant_levels_dec.c', |
| 146 | '../third_party/externals/libwebp/src/utils/rescaler.c', |
| 147 | '../third_party/externals/libwebp/src/utils/thread.c', |
| 148 | '../third_party/externals/libwebp/src/utils/utils.c', |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 149 | ], |
commit-bot@chromium.org | 4324c3b | 2014-02-21 20:11:42 +0000 | [diff] [blame] | 150 | 'cflags': [ '-w' ], |
mtklein | 2bb034a | 2014-12-15 12:59:07 -0800 | [diff] [blame] | 151 | 'xcode_settings': { 'WARNING_CFLAGS': [ '-w' ] }, |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 152 | }, |
| 153 | { |
| 154 | 'target_name': 'libwebp', |
| 155 | 'type': 'none', |
| 156 | 'dependencies' : [ |
| 157 | 'libwebp_dec', |
djsollen@google.com | 42416ee | 2013-06-10 15:19:33 +0000 | [diff] [blame] | 158 | 'libwebp_demux', |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 159 | 'libwebp_dsp', |
| 160 | 'libwebp_dsp_neon', |
| 161 | 'libwebp_enc', |
| 162 | 'libwebp_utils', |
| 163 | ], |
| 164 | 'direct_dependent_settings': { |
| 165 | 'include_dirs': [ |
djsollen@google.com | 42416ee | 2013-06-10 15:19:33 +0000 | [diff] [blame] | 166 | '../third_party/externals/libwebp/src', |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 167 | ], |
mtklein | 65fd599 | 2015-02-03 13:24:36 -0800 | [diff] [blame] | 168 | 'cflags': [ '-w' ], |
| 169 | 'xcode_settings': { 'WARNING_CFLAGS': [ '-w' ] }, |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 170 | }, |
| 171 | 'conditions': [ |
| 172 | ['OS!="win"', {'product_name': 'webp'}], |
| 173 | ], |
| 174 | }, |
| 175 | ], |
| 176 | }, { |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 177 | # use_system_libwep == 1 |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 178 | 'targets': [ |
| 179 | { |
| 180 | 'target_name': 'libwebp', |
| 181 | 'type': 'none', |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 182 | 'conditions': [ |
| 183 | [ 'skia_android_framework', { |
| 184 | 'direct_dependent_settings': { |
| 185 | 'libraries': [ |
| 186 | 'libwebp-decode.a', |
| 187 | 'libwebp-encode.a', |
| 188 | ], |
| 189 | 'include_dirs': [ |
| 190 | 'external/webp/include', |
| 191 | ], |
| 192 | }, |
| 193 | }, { # skia_android_framework == 0 |
| 194 | 'direct_dependent_settings': { |
| 195 | 'defines': [ |
| 196 | 'ENABLE_WEBP', |
| 197 | ], |
| 198 | }, |
| 199 | 'link_settings': { |
| 200 | 'libraries': [ |
| 201 | '-lwebp', |
| 202 | ], |
| 203 | }, |
| 204 | }, |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 205 | ], |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 206 | ], |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 207 | } |
| 208 | ], |
| 209 | }], |
| 210 | ], |
| 211 | } |