Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 1 | # Copyright 2014 The LibYuv Project Authors. All rights reserved. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license |
| 4 | # that can be found in the LICENSE file in the root of the source |
| 5 | # tree. An additional intellectual property rights grant can be found |
| 6 | # in the file PATENTS. All contributing project authors may |
| 7 | # be found in the AUTHORS file in the root of the source tree. |
| 8 | |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 9 | import("libyuv.gni") |
| 10 | import("//testing/test.gni") |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 11 | |
Frank Barchard | b33a82f | 2017-04-18 11:28:09 -0700 | [diff] [blame] | 12 | declare_args() { |
| 13 | # Set to false to disable building with gflags. |
| 14 | libyuv_use_gflags = true |
Chong Zhang | ab123ac | 2019-06-27 14:28:37 -0700 | [diff] [blame] | 15 | |
| 16 | # When building a shared library using a target in WebRTC or |
| 17 | # Chromium projects that depends on libyuv, setting this flag |
| 18 | # to true makes libyuv symbols visible inside that library. |
| 19 | libyuv_symbols_visible = false |
Frank Barchard | b33a82f | 2017-04-18 11:28:09 -0700 | [diff] [blame] | 20 | } |
| 21 | |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 22 | config("libyuv_config") { |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 23 | include_dirs = [ "include" ] |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 24 | if (is_android && current_cpu == "arm64") { |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 25 | ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker64" ] |
| 26 | } |
| 27 | if (is_android && current_cpu != "arm64") { |
| 28 | ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker" ] |
| 29 | } |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 30 | } |
| 31 | |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 32 | # This target is built when no specific target is specified on the command line. |
| 33 | group("default") { |
| 34 | testonly = true |
| 35 | deps = [ |
| 36 | ":libyuv", |
| 37 | ] |
| 38 | if (libyuv_include_tests) { |
| 39 | deps += [ |
| 40 | ":compare", |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 41 | ":cpuid", |
| 42 | ":libyuv_unittest", |
| 43 | ":psnr", |
Chong Zhang | ab123ac | 2019-06-27 14:28:37 -0700 | [diff] [blame] | 44 | ":yuvconvert", |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 45 | ] |
| 46 | } |
| 47 | } |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 48 | |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 49 | group("libyuv") { |
Chong Zhang | ab123ac | 2019-06-27 14:28:37 -0700 | [diff] [blame] | 50 | all_dependent_configs = [ ":libyuv_config" ] |
| 51 | deps = [] |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 52 | |
| 53 | if (is_win && target_cpu == "x64") { |
Chong Zhang | ab123ac | 2019-06-27 14:28:37 -0700 | [diff] [blame] | 54 | # Compile with clang in order to get inline assembly |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 55 | public_deps = [ |
Chong Zhang | ab123ac | 2019-06-27 14:28:37 -0700 | [diff] [blame] | 56 | ":libyuv_internal(//build/toolchain/win:win_clang_x64)", |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 57 | ] |
| 58 | } else { |
| 59 | public_deps = [ |
| 60 | ":libyuv_internal", |
| 61 | ] |
| 62 | } |
Chong Zhang | ab123ac | 2019-06-27 14:28:37 -0700 | [diff] [blame] | 63 | |
| 64 | if (libyuv_use_neon) { |
| 65 | deps += [ ":libyuv_neon" ] |
| 66 | } |
| 67 | |
| 68 | if (libyuv_use_msa) { |
| 69 | deps += [ ":libyuv_msa" ] |
| 70 | } |
| 71 | |
| 72 | if (libyuv_use_mmi) { |
| 73 | deps += [ ":libyuv_mmi" ] |
| 74 | } |
| 75 | |
| 76 | if (!is_ios) { |
| 77 | # Make sure that clients of libyuv link with libjpeg. This can't go in |
| 78 | # libyuv_internal because in Windows x64 builds that will generate a clang |
| 79 | # build of libjpeg, and we don't want two copies. |
| 80 | deps += [ "//third_party:jpeg" ] |
| 81 | } |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 82 | } |
| 83 | |
| 84 | static_library("libyuv_internal") { |
Chong Zhang | ab123ac | 2019-06-27 14:28:37 -0700 | [diff] [blame] | 85 | visibility = [ ":*" ] |
| 86 | |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 87 | sources = [ |
| 88 | # Headers |
| 89 | "include/libyuv.h", |
| 90 | "include/libyuv/basic_types.h", |
| 91 | "include/libyuv/compare.h", |
| 92 | "include/libyuv/convert.h", |
| 93 | "include/libyuv/convert_argb.h", |
| 94 | "include/libyuv/convert_from.h", |
| 95 | "include/libyuv/convert_from_argb.h", |
| 96 | "include/libyuv/cpu_id.h", |
| 97 | "include/libyuv/mjpeg_decoder.h", |
| 98 | "include/libyuv/planar_functions.h", |
| 99 | "include/libyuv/rotate.h", |
| 100 | "include/libyuv/rotate_argb.h", |
| 101 | "include/libyuv/rotate_row.h", |
| 102 | "include/libyuv/row.h", |
| 103 | "include/libyuv/scale.h", |
| 104 | "include/libyuv/scale_argb.h", |
| 105 | "include/libyuv/scale_row.h", |
| 106 | "include/libyuv/version.h", |
| 107 | "include/libyuv/video_common.h", |
| 108 | |
| 109 | # Source Files |
| 110 | "source/compare.cc", |
| 111 | "source/compare_common.cc", |
| 112 | "source/compare_gcc.cc", |
| 113 | "source/compare_win.cc", |
| 114 | "source/convert.cc", |
| 115 | "source/convert_argb.cc", |
| 116 | "source/convert_from.cc", |
| 117 | "source/convert_from_argb.cc", |
| 118 | "source/convert_jpeg.cc", |
| 119 | "source/convert_to_argb.cc", |
| 120 | "source/convert_to_i420.cc", |
| 121 | "source/cpu_id.cc", |
| 122 | "source/mjpeg_decoder.cc", |
| 123 | "source/mjpeg_validate.cc", |
| 124 | "source/planar_functions.cc", |
| 125 | "source/rotate.cc", |
| 126 | "source/rotate_any.cc", |
| 127 | "source/rotate_argb.cc", |
| 128 | "source/rotate_common.cc", |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 129 | "source/rotate_gcc.cc", |
| 130 | "source/rotate_win.cc", |
| 131 | "source/row_any.cc", |
| 132 | "source/row_common.cc", |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 133 | "source/row_gcc.cc", |
| 134 | "source/row_win.cc", |
| 135 | "source/scale.cc", |
| 136 | "source/scale_any.cc", |
| 137 | "source/scale_argb.cc", |
| 138 | "source/scale_common.cc", |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 139 | "source/scale_gcc.cc", |
| 140 | "source/scale_win.cc", |
| 141 | "source/video_common.cc", |
| 142 | ] |
| 143 | |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 144 | configs += [ ":libyuv_config" ] |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 145 | defines = [] |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 146 | deps = [] |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 147 | |
Chong Zhang | ab123ac | 2019-06-27 14:28:37 -0700 | [diff] [blame] | 148 | if (libyuv_symbols_visible) { |
| 149 | configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] |
| 150 | configs += [ "//build/config/gcc:symbol_visibility_default" ] |
| 151 | } |
| 152 | |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 153 | if (!is_ios) { |
| 154 | defines += [ "HAVE_JPEG" ] |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 155 | |
Chong Zhang | ab123ac | 2019-06-27 14:28:37 -0700 | [diff] [blame] | 156 | # Needed to pull in libjpeg headers. Can't add //third_party:jpeg to deps |
| 157 | # because in Windows x64 build it will get compiled with clang. |
| 158 | deps += [ "//third_party:jpeg_includes" ] |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 159 | } |
| 160 | |
| 161 | # Always enable optimization for Release and NaCl builds (to workaround |
| 162 | # crbug.com/538243). |
| 163 | if (!is_debug || is_nacl) { |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 164 | configs -= [ "//build/config/compiler:default_optimization" ] |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 165 | |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 166 | # Enable optimize for speed (-O2) over size (-Os). |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 167 | configs += [ "//build/config/compiler:optimize_max" ] |
| 168 | } |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 169 | |
| 170 | # To enable AVX2 or other cpu optimization, pass flag here |
Chong Zhang | ab123ac | 2019-06-27 14:28:37 -0700 | [diff] [blame] | 171 | if (!is_win) { |
| 172 | cflags = [ |
| 173 | # "-mpopcnt", |
| 174 | # "-mavx2", |
| 175 | # "-mfma", |
| 176 | "-ffp-contract=fast", # Enable fma vectorization for NEON. |
| 177 | ] |
| 178 | } |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 179 | } |
| 180 | |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 181 | if (libyuv_use_neon) { |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 182 | static_library("libyuv_neon") { |
| 183 | sources = [ |
| 184 | # ARM Source Files |
| 185 | "source/compare_neon.cc", |
| 186 | "source/compare_neon64.cc", |
| 187 | "source/rotate_neon.cc", |
| 188 | "source/rotate_neon64.cc", |
| 189 | "source/row_neon.cc", |
| 190 | "source/row_neon64.cc", |
| 191 | "source/scale_neon.cc", |
| 192 | "source/scale_neon64.cc", |
| 193 | ] |
| 194 | |
Chong Zhang | ab123ac | 2019-06-27 14:28:37 -0700 | [diff] [blame] | 195 | deps = [ |
| 196 | ":libyuv_internal", |
| 197 | ] |
| 198 | |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 199 | public_configs = [ ":libyuv_config" ] |
| 200 | |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 201 | # Always enable optimization for Release and NaCl builds (to workaround |
| 202 | # crbug.com/538243). |
| 203 | if (!is_debug) { |
| 204 | configs -= [ "//build/config/compiler:default_optimization" ] |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 205 | |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 206 | # Enable optimize for speed (-O2) over size (-Os). |
Chong Zhang | ab123ac | 2019-06-27 14:28:37 -0700 | [diff] [blame] | 207 | # TODO(fbarchard): Consider optimize_speed which is O3. |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 208 | configs += [ "//build/config/compiler:optimize_max" ] |
| 209 | } |
| 210 | |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 211 | if (current_cpu != "arm64") { |
| 212 | configs -= [ "//build/config/compiler:compiler_arm_fpu" ] |
| 213 | cflags = [ "-mfpu=neon" ] |
| 214 | } |
| 215 | } |
| 216 | } |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 217 | |
| 218 | if (libyuv_use_msa) { |
| 219 | static_library("libyuv_msa") { |
| 220 | sources = [ |
| 221 | # MSA Source Files |
Chong Zhang | ab123ac | 2019-06-27 14:28:37 -0700 | [diff] [blame] | 222 | "source/compare_msa.cc", |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 223 | "source/rotate_msa.cc", |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 224 | "source/row_msa.cc", |
| 225 | "source/scale_msa.cc", |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 226 | ] |
| 227 | |
Chong Zhang | ab123ac | 2019-06-27 14:28:37 -0700 | [diff] [blame] | 228 | deps = [ |
| 229 | ":libyuv_internal", |
| 230 | ] |
| 231 | |
| 232 | public_configs = [ ":libyuv_config" ] |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | if (libyuv_use_mmi) { |
| 237 | static_library("libyuv_mmi") { |
| 238 | sources = [ |
| 239 | # MMI Source Files |
| 240 | "source/compare_mmi.cc", |
| 241 | "source/rotate_mmi.cc", |
| 242 | "source/row_mmi.cc", |
| 243 | "source/scale_mmi.cc", |
| 244 | ] |
| 245 | |
| 246 | deps = [ |
| 247 | ":libyuv_internal", |
| 248 | ] |
| 249 | |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 250 | public_configs = [ ":libyuv_config" ] |
| 251 | } |
| 252 | } |
| 253 | |
| 254 | if (libyuv_include_tests) { |
| 255 | config("libyuv_unittest_warnings_config") { |
| 256 | if (!is_win) { |
| 257 | cflags = [ |
| 258 | # TODO(fbarchard): Fix sign and unused variable warnings. |
| 259 | "-Wno-sign-compare", |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 260 | "-Wno-unused-variable", |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 261 | ] |
| 262 | } |
| 263 | if (is_win) { |
| 264 | cflags = [ |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 265 | "/wd4245", # signed/unsigned mismatch |
| 266 | "/wd4189", # local variable is initialized but not referenced |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 267 | ] |
| 268 | } |
| 269 | } |
| 270 | config("libyuv_unittest_config") { |
| 271 | defines = [ "GTEST_RELATIVE_PATH" ] |
| 272 | } |
| 273 | |
| 274 | test("libyuv_unittest") { |
| 275 | testonly = true |
| 276 | |
| 277 | sources = [ |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 278 | # sources |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 279 | # headers |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 280 | "unit_test/basictypes_test.cc", |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 281 | "unit_test/color_test.cc", |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 282 | "unit_test/compare_test.cc", |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 283 | "unit_test/convert_test.cc", |
| 284 | "unit_test/cpu_test.cc", |
Chong Zhang | ab123ac | 2019-06-27 14:28:37 -0700 | [diff] [blame] | 285 | "unit_test/cpu_thread_test.cc", |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 286 | "unit_test/math_test.cc", |
| 287 | "unit_test/planar_test.cc", |
| 288 | "unit_test/rotate_argb_test.cc", |
| 289 | "unit_test/rotate_test.cc", |
| 290 | "unit_test/scale_argb_test.cc", |
| 291 | "unit_test/scale_test.cc", |
| 292 | "unit_test/unit_test.cc", |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 293 | "unit_test/unit_test.h", |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 294 | "unit_test/video_common_test.cc", |
| 295 | ] |
| 296 | |
| 297 | deps = [ |
| 298 | ":libyuv", |
| 299 | "//testing/gtest", |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 300 | ] |
| 301 | |
Frank Barchard | b33a82f | 2017-04-18 11:28:09 -0700 | [diff] [blame] | 302 | defines = [] |
| 303 | if (libyuv_use_gflags) { |
| 304 | defines += [ "LIBYUV_USE_GFLAGS" ] |
| 305 | deps += [ "//third_party/gflags" ] |
| 306 | } |
| 307 | |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 308 | configs += [ ":libyuv_unittest_warnings_config" ] |
| 309 | |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 310 | public_deps = [ |
| 311 | "//testing/gtest", |
| 312 | ] |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 313 | public_configs = [ ":libyuv_unittest_config" ] |
| 314 | |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 315 | if (is_linux) { |
| 316 | cflags = [ "-fexceptions" ] |
| 317 | } |
| 318 | if (is_ios) { |
| 319 | configs -= [ "//build/config/compiler:default_symbols" ] |
| 320 | configs += [ "//build/config/compiler:symbols" ] |
| 321 | cflags = [ "-Wno-sometimes-uninitialized" ] |
| 322 | } |
| 323 | if (!is_ios && !libyuv_disable_jpeg) { |
| 324 | defines += [ "HAVE_JPEG" ] |
| 325 | } |
| 326 | if (is_android) { |
| 327 | deps += [ "//testing/android/native_test:native_test_native_code" ] |
| 328 | } |
| 329 | |
| 330 | # TODO(YangZhang): These lines can be removed when high accuracy |
| 331 | # YUV to RGB to Neon is ported. |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 332 | if ((target_cpu == "armv7" || target_cpu == "armv7s" || |
| 333 | (target_cpu == "arm" && arm_version >= 7) || target_cpu == "arm64") && |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 334 | (arm_use_neon || arm_optionally_use_neon)) { |
| 335 | defines += [ "LIBYUV_NEON" ] |
| 336 | } |
| 337 | |
| 338 | defines += [ |
| 339 | # Enable the following 3 macros to turn off assembly for specified CPU. |
| 340 | # "LIBYUV_DISABLE_X86", |
| 341 | # "LIBYUV_DISABLE_NEON", |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 342 | # Enable the following macro to build libyuv as a shared library (dll). |
| 343 | # "LIBYUV_USING_SHARED_LIBRARY" |
| 344 | ] |
| 345 | } |
| 346 | |
| 347 | executable("compare") { |
| 348 | sources = [ |
| 349 | # sources |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 350 | "util/compare.cc", |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 351 | ] |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 352 | deps = [ |
| 353 | ":libyuv", |
| 354 | ] |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 355 | if (is_linux) { |
| 356 | cflags = [ "-fexceptions" ] |
| 357 | } |
| 358 | } |
| 359 | |
Frank Barchard | b33a82f | 2017-04-18 11:28:09 -0700 | [diff] [blame] | 360 | executable("yuvconvert") { |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 361 | sources = [ |
| 362 | # sources |
Frank Barchard | b33a82f | 2017-04-18 11:28:09 -0700 | [diff] [blame] | 363 | "util/yuvconvert.cc", |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 364 | ] |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 365 | deps = [ |
| 366 | ":libyuv", |
| 367 | ] |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 368 | if (is_linux) { |
| 369 | cflags = [ "-fexceptions" ] |
| 370 | } |
| 371 | } |
| 372 | |
| 373 | executable("psnr") { |
| 374 | sources = [ |
| 375 | # sources |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 376 | "util/psnr.cc", |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 377 | "util/psnr_main.cc", |
| 378 | "util/ssim.cc", |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 379 | ] |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 380 | deps = [ |
| 381 | ":libyuv", |
| 382 | ] |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 383 | |
| 384 | if (!is_ios && !libyuv_disable_jpeg) { |
| 385 | defines = [ "HAVE_JPEG" ] |
| 386 | } |
| 387 | } |
| 388 | |
| 389 | executable("cpuid") { |
| 390 | sources = [ |
| 391 | # sources |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 392 | "util/cpuid.c", |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 393 | ] |
Frank Barchard | cead1e0 | 2017-03-10 12:03:05 -0800 | [diff] [blame] | 394 | deps = [ |
| 395 | ":libyuv", |
| 396 | ] |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 397 | } |
| 398 | } |