libyuv/libyuv.bzl
Wan-Teh Chang 7ad044836d Do not use glob in the hdrs list of libyuv library
Some headers in the include/libyuv directory are private headers and
should not be visible to the clients of the libyuv library target. List
the public headers explicitly in the hdrs list of the libyuv library
target.

Ideally those private headers should be moved to some other directory
such as the source/ directory.

Change-Id: I04b1e209f6891f06c688fcf0bf5d167e82a27818
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/8308801
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Wan-Teh Chang <wtc@google.com>
Reviewed-by: Frank Barchard <fbarchard@google.com>
2026-08-28 15:17:28 -07:00

44 lines
1.1 KiB
Python

# Copyright 2026 The LibYuv Project Authors. All rights reserved.
#
# Shared target definitions for Bazel and Blaze builds.
def libyuv_srcs(prefix = ""):
return native.glob(
[
prefix + "source/*.cc",
prefix + "include/libyuv/*.h",
],
exclude = [
prefix + "source/*neon*.cc",
prefix + "source/*sve*.cc",
prefix + "source/*sme*.cc",
],
)
def libyuv_hdrs(prefix = ""):
return [
prefix + "include/libyuv/compare.h",
prefix + "include/libyuv/convert.h",
prefix + "include/libyuv/convert_from_argb.h",
prefix + "include/libyuv/cpu_id.h",
prefix + "include/libyuv/row.h", # Bug 553148013: Should be private.
]
def libyuv_neon_srcs(prefix = ""):
return native.glob([
prefix + "source/*neon*.cc",
prefix + "include/libyuv/*.h",
])
def libyuv_sve_srcs(prefix = ""):
return native.glob([
prefix + "source/*sve*.cc",
prefix + "include/libyuv/*.h",
])
def libyuv_test_srcs(prefix = ""):
return native.glob([
prefix + "unit_test/*.cc",
prefix + "unit_test/*.h",
])