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
9config("libyuv_config") {
10  include_dirs = [
11    ".",
12    "include",
13  ]
14}
15
16source_set("libyuv") {
17  sources = [
18    "include/libyuv.h",
19    "include/libyuv/basic_types.h",
20    "include/libyuv/compare.h",
21    "include/libyuv/convert.h",
22    "include/libyuv/convert_argb.h",
23    "include/libyuv/convert_from.h",
24    "include/libyuv/convert_from_argb.h",
25    "include/libyuv/cpu_id.h",
26    "include/libyuv/format_conversion.h",
27    "include/libyuv/mjpeg_decoder.h",
28    "include/libyuv/planar_functions.h",
29    "include/libyuv/rotate.h",
30    "include/libyuv/rotate_argb.h",
31    "include/libyuv/row.h",
32    "include/libyuv/scale.h",
33    "include/libyuv/scale_argb.h",
34    "include/libyuv/scale_row.h",
35    "include/libyuv/version.h",
36    "include/libyuv/video_common.h",
37
38    # sources.
39    "source/compare.cc",
40    "source/compare_common.cc",
41    "source/compare_posix.cc",
42    "source/compare_win.cc",
43    "source/convert.cc",
44    "source/convert_argb.cc",
45    "source/convert_from.cc",
46    "source/convert_from_argb.cc",
47    "source/convert_jpeg.cc",
48    "source/convert_to_argb.cc",
49    "source/convert_to_i420.cc",
50    "source/cpu_id.cc",
51    "source/format_conversion.cc",
52    "source/mjpeg_decoder.cc",
53    "source/mjpeg_validate.cc",
54    "source/planar_functions.cc",
55    "source/rotate.cc",
56    "source/rotate_argb.cc",
57    "source/rotate_mips.cc",
58    "source/row_any.cc",
59    "source/row_common.cc",
60    "source/row_mips.cc",
61    "source/row_posix.cc",
62    "source/row_win.cc",
63    "source/scale.cc",
64    "source/scale_argb.cc",
65    "source/scale_common.cc",
66    "source/scale_mips.cc",
67    "source/scale_posix.cc",
68    "source/scale_win.cc",
69    "source/video_common.cc",
70  ]
71
72  direct_dependent_configs = [ ":libyuv_config" ]
73
74  defines = []
75
76  if (!is_ios) {
77    defines += [ "HAVE_JPEG" ]
78  }
79
80  if (is_msan) {
81    # MemorySanitizer does not support assembly code yet.
82    # http://crbug.com/344505
83    defines += [ "LIBYUV_DISABLE_X86" ]
84  }
85
86  deps = [
87    "//third_party:jpeg",
88  ]
89
90  # TODO(GYP) Neon build.
91}
92