blob: 67b7990f753a72970414c3a5e1f274ad89393288 [file] [log] [blame]
# Copyright 2017 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/bind/bind.gni")
import("//build/components.gni")
import("//build/drivers.gni")
import("//src/camera/debug.gni")
group("tests") {
testonly = true
deps = [ ":usb_video_bind_test" ]
}
driver_bind_rules("usb_video_bind") {
rules = "usb_video.bind"
header_output = "bind.h"
tests = "bind_tests.json"
deps = [
"//src/devices/bind/fuchsia.usb",
"//src/devices/bind/fuchsia.usb.video",
]
}
source_set("lib") {
defines = [ camera_debug_define ]
sources = [
"descriptors.cc",
"descriptors.h",
"usb_state.cc",
"usb_state.h",
"usb_video_stream.cc",
"usb_video_stream.h",
"video_frame.cc",
"video_frame.h",
]
deps = [
":usb_video_bind",
"//sdk/lib/fidl/cpp",
"//sdk/lib/syslog/cpp",
"//sdk/lib/syslog/cpp:backend",
"//src/devices/lib/driver",
"//src/lib/listnode",
"//zircon/system/ulib/affine",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/zircon-internal",
]
public_deps = [
"//sdk/banjo/fuchsia.hardware.usb:fuchsia.hardware.usb_banjo_cpp",
"//sdk/fidl/fuchsia.camera:fuchsia.camera_hlcpp",
"//sdk/fidl/fuchsia.hardware.camera:fuchsia.hardware.camera_cpp_wire",
"//src/devices/usb/lib/usb",
"//src/devices/usb/lib/usb:video",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/system/ulib/fzl",
]
}
fuchsia_driver("fuchsia_driver") {
output_name = "usb_video"
deps = [
":lib",
"//sdk/lib/syslog/cpp:backend",
]
}
fuchsia_driver_component("driver") {
component_name = "usb_video"
deps = [ ":fuchsia_driver" ]
info = "driver-info.json"
colocate = true
}
fuchsia_driver_package("usb_video") {
driver_components = [ ":driver" ]
}