| # Copyright 2023 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") |
| |
| executable("bin") { |
| output_name = "config_from_parent_example_cpp" |
| sources = [ "main.cc" ] |
| deps = [ |
| ":example_config", |
| "//sdk/lib/inspect/component/cpp", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/syslog/cpp", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| } |
| |
| fuchsia_component_manifest("manifest") { |
| component_name = "config_example" |
| manifest = "meta/config_example.cml" |
| } |
| |
| fuchsia_component("component") { |
| cm_label = ":manifest" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_structured_config_cpp_elf_lib("example_config") { |
| cm_label = ":manifest" |
| } |
| |
| fuchsia_structured_config_values("values_from_gn") { |
| cm_label = ":manifest" |
| values = { |
| greeting = "World!" |
| } |
| } |
| |
| fuchsia_package("cpp_config_from_parent_example") { |
| deps = [ |
| ":component", |
| ":values_from_gn", |
| ] |
| } |
| |
| group("cpp") { |
| deps = [ ":cpp_config_from_parent_example" ] |
| } |