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