| # Copyright 2022 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("lifecycle_example") { | |
| output_name = "lifecycle_example_cpp" | |
| sources = [ "lifecycle.cc" ] | |
| deps = [ | |
| "//sdk/fidl/fuchsia.process.lifecycle:fuchsia.process.lifecycle_hlcpp", | |
| "//sdk/lib/async", | |
| "//sdk/lib/async:async-cpp", | |
| "//sdk/lib/async-loop:async-loop-cpp", | |
| "//sdk/lib/async-loop:async-loop-default", | |
| "//sdk/lib/syslog/cpp", | |
| ] | |
| } | |
| executable("lifecycle_manager") { | |
| output_name = "lifecycle_manager_cpp" | |
| sources = [ "manager.cc" ] | |
| deps = [ | |
| "//examples/components/routing/fidl:echo_hlcpp", | |
| "//sdk/fidl/fuchsia.component:fuchsia.component_hlcpp", | |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_hlcpp", | |
| "//sdk/lib/async", | |
| "//sdk/lib/async:async-cpp", | |
| "//sdk/lib/async-loop:async-loop-cpp", | |
| "//sdk/lib/async-loop:async-loop-default", | |
| "//sdk/lib/sys/cpp", | |
| "//sdk/lib/syslog/cpp", | |
| ] | |
| } | |
| fuchsia_package_with_single_component("cpp") { | |
| # Since `//examples/components/lifecycle/README.md` includes instructions to | |
| # use `ffx component run` to launch one of two versions of `lifecycle`, the | |
| # two versions need unique package names (`lifecycle_cpp` in this case). | |
| component_name = "default" | |
| package_name = "lifecycle_cpp" | |
| manifest = "meta/lifecycle.cml" | |
| deps = [ ":lifecycle_example" ] | |
| } | |
| fuchsia_component("manager-component") { | |
| component_name = "lifecycle_manager" | |
| manifest = "meta/manager.cml" | |
| deps = [ ":lifecycle_manager" ] | |
| } |