| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 { | 5 { |
| 6 'variables': { | 6 'variables': { |
| 7 'use_system_libwebp%': 0, | 7 'use_system_libwebp%': 0, |
| 8 }, | 8 }, |
| 9 'conditions': [ | 9 'conditions': [ |
| 10 ['use_system_libwebp==0', { | 10 ['use_system_libwebp==0', { |
| 11 'targets': [ | 11 'targets': [ |
| 12 { | 12 { |
| 13 'target_name': 'libwebp_dec', | 13 'target_name': 'libwebp_dec', |
| 14 'type': 'static_library', | 14 'type': 'static_library', |
| 15 'include_dirs': [ | 15 'include_dirs': [ |
| 16 '../third_party/externals/libwebp', | 16 '../third_party/externals/libwebp', |
| 17 ], | 17 ], |
| 18 'sources': [ | 18 'sources': [ |
| 19 '../third_party/externals/libwebp/dec/alpha.c', | 19 '../third_party/externals/libwebp/src/dec/alpha.c', |
| 20 '../third_party/externals/libwebp/dec/buffer.c', | 20 '../third_party/externals/libwebp/src/dec/buffer.c', |
| 21 '../third_party/externals/libwebp/dec/frame.c', | 21 '../third_party/externals/libwebp/src/dec/frame.c', |
| 22 '../third_party/externals/libwebp/dec/idec.c', | 22 '../third_party/externals/libwebp/src/dec/idec.c', |
| 23 '../third_party/externals/libwebp/dec/io.c', | 23 '../third_party/externals/libwebp/src/dec/io.c', |
| 24 '../third_party/externals/libwebp/dec/layer.c', | 24 '../third_party/externals/libwebp/src/dec/layer.c', |
| 25 '../third_party/externals/libwebp/dec/quant.c', | 25 '../third_party/externals/libwebp/src/dec/quant.c', |
| 26 '../third_party/externals/libwebp/dec/tree.c', | 26 '../third_party/externals/libwebp/src/dec/tree.c', |
| 27 '../third_party/externals/libwebp/dec/vp8.c', | 27 '../third_party/externals/libwebp/src/dec/vp8.c', |
| 28 '../third_party/externals/libwebp/dec/vp8l.c', | 28 '../third_party/externals/libwebp/src/dec/vp8l.c', |
| 29 '../third_party/externals/libwebp/dec/webp.c', | 29 '../third_party/externals/libwebp/src/dec/webp.c', |
| 30 ], | 30 ], |
| 31 }, | 31 }, |
| 32 { | 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', |
| 40 ], |
| 41 }, |
| 42 { |
| 33 'target_name': 'libwebp_dsp', | 43 'target_name': 'libwebp_dsp', |
| 34 'type': 'static_library', | 44 'type': 'static_library', |
| 35 'include_dirs': [ | 45 'include_dirs': [ |
| 36 '../third_party/externals/libwebp', | 46 '../third_party/externals/libwebp', |
| 37 ], | 47 ], |
| 38 'sources': [ | 48 'sources': [ |
| 39 '../third_party/externals/libwebp/dsp/cpu.c', | 49 '../third_party/externals/libwebp/src/dsp/cpu.c', |
| 40 '../third_party/externals/libwebp/dsp/dec.c', | 50 '../third_party/externals/libwebp/src/dsp/dec.c', |
| 41 '../third_party/externals/libwebp/dsp/dec_sse2.c', | 51 '../third_party/externals/libwebp/src/dsp/dec_sse2.c', |
| 42 '../third_party/externals/libwebp/dsp/enc.c', | 52 '../third_party/externals/libwebp/src/dsp/enc.c', |
| 43 '../third_party/externals/libwebp/dsp/enc_sse2.c', | 53 '../third_party/externals/libwebp/src/dsp/enc_sse2.c', |
| 44 '../third_party/externals/libwebp/dsp/lossless.c', | 54 '../third_party/externals/libwebp/src/dsp/lossless.c', |
| 45 '../third_party/externals/libwebp/dsp/upsampling.c', | 55 '../third_party/externals/libwebp/src/dsp/upsampling.c', |
| 46 '../third_party/externals/libwebp/dsp/upsampling_sse2.c', | 56 '../third_party/externals/libwebp/src/dsp/upsampling_sse2.c', |
| 47 '../third_party/externals/libwebp/dsp/yuv.c', | 57 '../third_party/externals/libwebp/src/dsp/yuv.c', |
| 48 ], | 58 ], |
| 49 'conditions': [ | 59 'conditions': [ |
| 50 ['skia_os == "android"', { | 60 ['skia_os == "android"', { |
| 51 'dependencies' : [ | 61 'dependencies' : [ |
| 52 'android_deps.gyp:cpu_features', | 62 'android_deps.gyp:cpu_features', |
| 53 ], | 63 ], |
| 54 }], | 64 }], |
| 55 ], | 65 ], |
| 56 }, | 66 }, |
| 57 { | 67 { |
| 58 'target_name': 'libwebp_dsp_neon', | 68 'target_name': 'libwebp_dsp_neon', |
| 59 'conditions': [ | 69 'conditions': [ |
| 60 ['armv7 == 1', { | 70 ['armv7 == 1', { |
| 61 'type': 'static_library', | 71 'type': 'static_library', |
| 62 'include_dirs': [ | 72 'include_dirs': [ |
| 63 '../third_party/externals/libwebp', | 73 '../third_party/externals/libwebp', |
| 64 ], | 74 ], |
| 65 'sources': [ | 75 'sources': [ |
| 66 '../third_party/externals/libwebp/dsp/dec_neon.c', | 76 '../third_party/externals/libwebp/src/dsp/dec_neon.c', |
| 67 ], | 77 ], |
| 68 # behavior similar dsp_neon.c.neon in an Android.mk | 78 # behavior similar dsp_neon.c.neon in an Android.mk |
| 69 'cflags!': [ | 79 'cflags!': [ |
| 70 '-mfpu=vfpv3-d16', | 80 '-mfpu=vfpv3-d16', |
| 71 ], | 81 ], |
| 72 'cflags': [ '-mfpu=neon' ], | 82 'cflags': [ '-mfpu=neon' ], |
| 73 },{ # "armv7 != 1" | 83 },{ # "armv7 != 1" |
| 74 'type': 'none', | 84 'type': 'none', |
| 75 }], | 85 }], |
| 76 ], | 86 ], |
| 77 }, | 87 }, |
| 78 { | 88 { |
| 79 'target_name': 'libwebp_enc', | 89 'target_name': 'libwebp_enc', |
| 80 'type': 'static_library', | 90 'type': 'static_library', |
| 81 'include_dirs': [ | 91 'include_dirs': [ |
| 82 '../third_party/externals/libwebp', | 92 '../third_party/externals/libwebp', |
| 83 ], | 93 ], |
| 84 'sources': [ | 94 'sources': [ |
| 85 '../third_party/externals/libwebp/enc/alpha.c', | 95 '../third_party/externals/libwebp/src/enc/alpha.c', |
| 86 '../third_party/externals/libwebp/enc/analysis.c', | 96 '../third_party/externals/libwebp/src/enc/analysis.c', |
| 87 '../third_party/externals/libwebp/enc/backward_references.c', | 97 '../third_party/externals/libwebp/src/enc/backward_references.c', |
| 88 '../third_party/externals/libwebp/enc/config.c', | 98 '../third_party/externals/libwebp/src/enc/config.c', |
| 89 '../third_party/externals/libwebp/enc/cost.c', | 99 '../third_party/externals/libwebp/src/enc/cost.c', |
| 90 '../third_party/externals/libwebp/enc/filter.c', | 100 '../third_party/externals/libwebp/src/enc/filter.c', |
| 91 '../third_party/externals/libwebp/enc/frame.c', | 101 '../third_party/externals/libwebp/src/enc/frame.c', |
| 92 '../third_party/externals/libwebp/enc/histogram.c', | 102 '../third_party/externals/libwebp/src/enc/histogram.c', |
| 93 '../third_party/externals/libwebp/enc/iterator.c', | 103 '../third_party/externals/libwebp/src/enc/iterator.c', |
| 94 '../third_party/externals/libwebp/enc/layer.c', | 104 '../third_party/externals/libwebp/src/enc/layer.c', |
| 95 '../third_party/externals/libwebp/enc/picture.c', | 105 '../third_party/externals/libwebp/src/enc/picture.c', |
| 96 '../third_party/externals/libwebp/enc/quant.c', | 106 '../third_party/externals/libwebp/src/enc/quant.c', |
| 97 '../third_party/externals/libwebp/enc/syntax.c', | 107 '../third_party/externals/libwebp/src/enc/syntax.c', |
| 98 '../third_party/externals/libwebp/enc/tree.c', | 108 '../third_party/externals/libwebp/src/enc/token.c', |
| 99 '../third_party/externals/libwebp/enc/vp8l.c', | 109 '../third_party/externals/libwebp/src/enc/tree.c', |
| 100 '../third_party/externals/libwebp/enc/webpenc.c', | 110 '../third_party/externals/libwebp/src/enc/vp8l.c', |
| 111 '../third_party/externals/libwebp/src/enc/webpenc.c', |
| 101 ], | 112 ], |
| 102 }, | 113 }, |
| 103 { | 114 { |
| 104 'target_name': 'libwebp_utils', | 115 'target_name': 'libwebp_utils', |
| 105 'type': 'static_library', | 116 'type': 'static_library', |
| 106 'include_dirs': [ | 117 'include_dirs': [ |
| 107 '../third_party/externals/libwebp', | 118 '../third_party/externals/libwebp', |
| 108 ], | 119 ], |
| 109 'sources': [ | 120 'sources': [ |
| 110 '../third_party/externals/libwebp/utils/bit_reader.c', | 121 '../third_party/externals/libwebp/src/utils/bit_reader.c', |
| 111 '../third_party/externals/libwebp/utils/bit_writer.c', | 122 '../third_party/externals/libwebp/src/utils/bit_writer.c', |
| 112 '../third_party/externals/libwebp/utils/color_cache.c', | 123 '../third_party/externals/libwebp/src/utils/color_cache.c', |
| 113 '../third_party/externals/libwebp/utils/filters.c', | 124 '../third_party/externals/libwebp/src/utils/filters.c', |
| 114 '../third_party/externals/libwebp/utils/huffman.c', | 125 '../third_party/externals/libwebp/src/utils/huffman.c', |
| 115 '../third_party/externals/libwebp/utils/huffman_encode.c', | 126 '../third_party/externals/libwebp/src/utils/huffman_encode.c', |
| 116 '../third_party/externals/libwebp/utils/quant_levels.c', | 127 '../third_party/externals/libwebp/src/utils/quant_levels.c', |
| 117 '../third_party/externals/libwebp/utils/rescaler.c', | 128 '../third_party/externals/libwebp/src/utils/quant_levels_dec.c', |
| 118 '../third_party/externals/libwebp/utils/thread.c', | 129 '../third_party/externals/libwebp/src/utils/rescaler.c', |
| 119 '../third_party/externals/libwebp/utils/utils.c', | 130 '../third_party/externals/libwebp/src/utils/thread.c', |
| 131 '../third_party/externals/libwebp/src/utils/utils.c', |
| 120 ], | 132 ], |
| 121 }, | 133 }, |
| 122 { | 134 { |
| 123 'target_name': 'libwebp', | 135 'target_name': 'libwebp', |
| 124 'type': 'none', | 136 'type': 'none', |
| 125 'dependencies' : [ | 137 'dependencies' : [ |
| 126 'libwebp_dec', | 138 'libwebp_dec', |
| 139 'libwebp_demux', |
| 127 'libwebp_dsp', | 140 'libwebp_dsp', |
| 128 'libwebp_dsp_neon', | 141 'libwebp_dsp_neon', |
| 129 'libwebp_enc', | 142 'libwebp_enc', |
| 130 'libwebp_utils', | 143 'libwebp_utils', |
| 131 ], | 144 ], |
| 132 'direct_dependent_settings': { | 145 'direct_dependent_settings': { |
| 133 'include_dirs': [ | 146 'include_dirs': [ |
| 134 '../third_party/externals/libwebp', | 147 '../third_party/externals/libwebp/src', |
| 135 ], | 148 ], |
| 136 }, | 149 }, |
| 137 'conditions': [ | 150 'conditions': [ |
| 138 ['OS!="win"', {'product_name': 'webp'}], | 151 ['OS!="win"', {'product_name': 'webp'}], |
| 139 ], | 152 ], |
| 140 }, | 153 }, |
| 141 ], | 154 ], |
| 142 }, { | 155 }, { |
| 143 'targets': [ | 156 'targets': [ |
| 144 { | 157 { |
| 145 'target_name': 'libwebp', | 158 'target_name': 'libwebp', |
| 146 'type': 'none', | 159 'type': 'none', |
| 147 'direct_dependent_settings': { | 160 'direct_dependent_settings': { |
| 148 'defines': [ | 161 'defines': [ |
| 149 'ENABLE_WEBP', | 162 'ENABLE_WEBP', |
| 150 ], | 163 ], |
| 151 }, | 164 }, |
| 152 'link_settings': { | 165 'link_settings': { |
| 153 'libraries': [ | 166 'libraries': [ |
| 154 '-lwebp', | 167 '-lwebp', |
| 155 ], | 168 ], |
| 156 }, | 169 }, |
| 157 } | 170 } |
| 158 ], | 171 ], |
| 159 }], | 172 }], |
| 160 ], | 173 ], |
| 161 } | 174 } |
| OLD | NEW |