blob: ce09f3a8e8bcd70e97186e938b983a751a4a8aed [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",
"uvc-tester",
]
}
driver_bind_rules("usb_video_bind") {
rules = "usb_video.bind"
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",
"//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",
"//src/devices/usb/lib/usb",
"//src/devices/usb/lib/usb:video",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/system/ulib/fzl",
"//zircon/system/ulib/sysmem-version",
]
}
fuchsia_driver("fuchsia_driver") {
output_name = "usb_video"
deps = [ ":lib" ]
}
fuchsia_driver_component("driver") {
component_name = "usb_video"
deps = [ ":fuchsia_driver" ]
info = "driver-info.json"
manifest = "meta/driver.cml"
}
fuchsia_driver_package("usb_video") {
driver_components = [ ":driver" ]
}