Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions modules/drivers/camera/format/BUILD
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
load("//tools:cpplint.bzl", "cpplint")

load("@local_config_cuda//cuda:build_defs.bzl", "cuda_library")
load("@local_config_cuda//cuda:build_defs.bzl", "cuda_library", "if_cuda")

load("//tools:apollo_package.bzl", "apollo_package")

package(default_visibility = ["//visibility:public"])

# yuv2rgb.cu can only be compiled with the CUDA toolchain. Since this
# package's generated `:install` target is unconditionally pulled in by
# //modules/drivers/camera's own `:install` aggregation (via
# apollo_package()'s automatic subpackage deps), simply excluding this
# package from CPU builds isn't enough to keep it from being built. Instead,
# drop the CUDA source when CUDA isn't configured so `:convert` degrades to
# an empty (but buildable) library on CPU-only builds.
cuda_library(
name = "convert",
srcs = ["yuv2rgb.cu"],
srcs = if_cuda(["yuv2rgb.cu"], []),
hdrs = ["yuv2rgb.h"],
deps = [
"//cyber",
Expand Down