blob: 42226e86f1c04a8a0228b7f6103e5d01f6cc250a [file] [log] [blame]
# 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/syslog/cpp",
"//zircon/system/ulib/async",
"//zircon/system/ulib/async:async-cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
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/sys/cpp",
"//sdk/lib/syslog/cpp",
"//zircon/system/ulib/async",
"//zircon/system/ulib/async:async-cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
fuchsia_package_with_single_component("lifecycle") {
# 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" ]
}