| # Copyright 2016 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") |
| import("//build/config.gni") |
| import("//build/security.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| "integration_tests", |
| "test", |
| ] |
| } |
| |
| source_set("lib") { |
| sources = [ |
| "app.cc", |
| "app.h", |
| "config.cc", |
| "config.h", |
| "package_updating_loader.cc", |
| "package_updating_loader.h", |
| ] |
| |
| public_deps = [ |
| "//sdk/fidl/fuchsia.hardware.power.statecontrol", |
| "//sdk/fidl/fuchsia.pkg", |
| "//sdk/lib/fidl/cpp", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/fostr/fidl/fuchsia.pkg", |
| "//src/lib/fsl", |
| "//src/lib/fxl", |
| "//src/lib/json_parser", |
| "//src/lib/loader", |
| "//src/lib/pkg_url", |
| "//third_party/rapidjson", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| ] |
| |
| if (auto_update_packages) { |
| public_configs = [ ":update_packages_config" ] |
| } |
| |
| # TODO(https://fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| executable("bin") { |
| output_name = "sysmgr" |
| |
| sources = [ "main.cc" ] |
| |
| deps = [ |
| ":lib", |
| "//src/lib/fxl", |
| "//zircon/system/ulib/async-default", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| } |
| |
| fuchsia_component("sysmgr_component") { |
| manifest = "meta/sysmgr.cmx" |
| component_name = "sysmgr" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_package("sysmgr") { |
| deps = [ ":sysmgr_component" ] |
| } |
| |
| template("cfg") { |
| config_data(target_name) { |
| forward_variables_from(invoker, |
| [ |
| "testonly", |
| "visibility", |
| ]) |
| for_pkg = "sysmgr" |
| sources = [ rebase_path("config/${invoker.name}") ] |
| } |
| } |
| |
| cfg("services_config") { |
| name = "services.config" |
| } |
| |
| cfg("router_config") { |
| name = "router.config" |
| } |
| |
| config("update_packages_config") { |
| defines = [ "AUTO_UPDATE_PACKAGES" ] |
| } |