| # Copyright 2026 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") | |
| fuchsia_driver_dml("config_driver-dml") { | |
| dml = "meta/config_driver.dml" | |
| driver_name = "config_driver" | |
| } | |
| driver_bind_rules("bind") { | |
| dml_label = ":config_driver-dml" | |
| bind_output = "example_config_driver.bindbc" | |
| deps = [ "//examples/drivers/bind/bindlib:gizmo.example" ] | |
| } | |
| # [START manifest_declaration] | |
| fuchsia_component_manifest("component-manifest") { | |
| component_name = "example_config_driver" | |
| manifest = "meta/config_driver.cml" | |
| } | |
| fuchsia_structured_config_cpp_elf_lib("example-config-driver-config") { | |
| cm_label = ":component-manifest" | |
| } | |
| fuchsia_driver_component("component") { | |
| cm_label = ":component-manifest" | |
| deps = [ | |
| ":bind", | |
| ":driver", | |
| ] | |
| info = "meta/component-info.json" | |
| } | |
| fuchsia_cc_driver("driver") { | |
| output_name = "example_config_driver" | |
| sources = [ "config_driver.cc" ] | |
| deps = [ | |
| ":example-config-driver-config", | |
| "//sdk/lib/driver/component/cpp", | |
| "//src/devices/lib/driver:driver_runtime", | |
| ] | |
| } | |
| # [END manifest_declaration] | |
| fuchsia_driver_package("pkg") { | |
| package_name = "example_config_driver" | |
| driver_components = [ ":component" ] | |
| } |