| # Copyright 2019 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("//build/test.gni") |
| |
| driver_bind_rules("goldfish-display-bind") { |
| rules = "goldfish-display.bind" |
| tests = "bind-tests.json" |
| deps = [ "//src/devices/bind/fuchsia.goldfish.platform" ] |
| } |
| |
| fuchsia_driver("goldfish-display-driver") { |
| output_name = "goldfish-display" |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| sources = [ |
| "display.cc", |
| "display.h", |
| ] |
| deps = [ |
| ":common", |
| ":goldfish-display-bind", |
| "//src/devices/lib/driver", |
| ] |
| |
| # TODO(https://fxbug.dev/42136089): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| fuchsia_driver_component("goldfish-display") { |
| component_name = "goldfish-display" |
| deps = [ ":goldfish-display-driver" ] |
| info = "goldfish-display-info.json" |
| manifest = "meta/goldfish-display.cml" |
| } |
| |
| fuchsia_driver_package("goldfish_display") { |
| driver_components = [ ":goldfish-display" ] |
| } |
| |
| source_set("common") { |
| visibility = [ ":*" ] |
| configs += [ "//build/config:all_source" ] |
| sources = [ |
| "render_control.cc", |
| "render_control.h", |
| ] |
| public_deps = [ |
| "//sdk/banjo/fuchsia.hardware.display.controller:fuchsia.hardware.display.controller_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.goldfish.control:fuchsia.hardware.goldfish.control_banjo_cpp", |
| "//sdk/fidl/fuchsia.hardware.goldfish:fuchsia.hardware.goldfish_cpp", |
| "//sdk/fidl/fuchsia.hardware.goldfish.pipe:fuchsia.hardware.goldfish.pipe_cpp", |
| "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_cpp", |
| "//src/devices/lib/goldfish/pipe_headers", |
| "//src/devices/lib/goldfish/pipe_io", |
| "//src/graphics/display/lib/api-types-cpp", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//src/lib/fxl", |
| "//zircon/system/ulib/async:async-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/fzl", |
| "//zircon/system/ulib/image-format", |
| "//zircon/system/ulib/sync:sync-cpp", |
| "//zircon/system/ulib/trace", |
| "//zircon/system/ulib/zircon-internal", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| test("goldfish-unittests") { |
| configs += [ "//build/config:all_source" ] |
| sources = [ |
| "display-test.cc", |
| "display.cc", |
| "display.h", |
| ] |
| deps = [ |
| ":common", |
| ":goldfish-display-bind", |
| "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_cpp_testing", |
| "//sdk/lib/fdio", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/testing/no_ddk", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/predicates", |
| "//third_party/googletest:gtest", |
| ] |
| |
| # TODO(https://fxbug.dev/42136089): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":goldfish-display-bind_test", |
| ":goldfish-unittests-package", |
| ] |
| } |
| |
| fuchsia_unittest_package("goldfish-unittests-package") { |
| package_name = "goldfish-unittests" |
| deps = [ ":goldfish-unittests" ] |
| } |