blob: 7f1ff8948913c9fc4221920c7092567ae62a7efa [file] [log] [blame]
# Copyright 2021 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/components.gni")
import("//build/fidl/fidl.gni")
group("tests") {
testonly = true
deps = [
":stream_storage_unittest",
":virtual_camera_agent_unittest",
]
}
fidl("fuchsia.camera.test.virtualcamera") {
sdk_category = "internal"
sources = [ "virtual_camera.test.fidl" ]
}
source_set("virtual_camera_hal_controller") {
sources = [
"virtual_camera_hal_controller.cc",
"virtual_camera_hal_controller.h",
]
public_deps = [
":stream_storage",
"//sdk/fidl/fuchsia.camera2.hal",
"//sdk/lib/fidl/cpp",
]
deps = [ "//sdk/lib/syslog/cpp" ]
}
source_set("stream_storage") {
sources = [
"stream_storage.cc",
"stream_storage.h",
]
public_deps = [
"//sdk/fidl/fuchsia.camera2.hal",
"//zircon/system/ulib/fbl",
]
}
source_set("virtual_camera_agent") {
sources = [
"virtual_camera_agent.cc",
"virtual_camera_agent.h",
]
deps = [
"//sdk/lib/syslog/cpp",
"//src/camera/lib/stream_utils:stream_configs",
]
public_deps = [
":fuchsia.camera.test.virtualcamera",
":stream_storage",
":virtual_camera_hal_controller",
"//sdk/fidl/fuchsia.hardware.camera",
"//sdk/lib/sys/cpp",
"//src/camera/bin/device_watcher:fuchsia.camera.test",
]
}
executable("virtual_camera_bin") {
output_name = "virtual_camera"
sources = [ "main.cc" ]
deps = [
":stream_storage",
":virtual_camera_agent",
"//sdk/lib/modular/cpp",
"//sdk/lib/sys/cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
fuchsia_component("virtual_camera_component") {
deps = [ ":virtual_camera_bin" ]
component_name = "virtual_camera"
manifest = "meta/virtual_camera.cmx"
}
fuchsia_package("virtual_camera_pkg") {
deps = [ ":virtual_camera_component" ]
package_name = "virtual_camera"
}
executable("virtual_camera_agent_unittest_bin") {
testonly = true
sources = [ "virtual_camera_agent_unittest.cc" ]
deps = [
":virtual_camera_agent",
"//sdk/lib/sys/cpp/testing:unit",
"//src/camera/lib/stream_utils:stream_configs",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture",
"//third_party/googletest:gmock",
]
}
fuchsia_unittest_package("virtual_camera_agent_unittest") {
manifest = "meta/virtual_camera_agent_unittest.cml"
deps = [ ":virtual_camera_agent_unittest_bin" ]
}
executable("stream_storage_unittest_bin") {
testonly = true
sources = [ "stream_storage_unittest.cc" ]
deps = [
":stream_storage",
"//sdk/lib/sys/cpp/testing:unit",
"//src/camera/lib/stream_utils:stream_configs",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture",
"//third_party/googletest:gmock",
]
}
fuchsia_unittest_package("stream_storage_unittest") {
manifest = "meta/stream_storage_unittest.cml"
deps = [ ":stream_storage_unittest_bin" ]
}