| # Copyright 2019 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/dist/component_manifest_resources.gni") |
| |
| executable("pwrbtn-monitor") { |
| if (is_fuchsia) { |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| } |
| if (is_fuchsia) { |
| fdio_config = [ "//build/config/fuchsia:fdio_config" ] |
| if (configs + fdio_config - fdio_config != configs) { |
| configs -= fdio_config |
| } |
| } |
| sources = [ "pwrbtn-monitor.cc" ] |
| deps = [ |
| "//sdk/fidl/fuchsia.hardware.input:fuchsia.hardware.input_llcpp", |
| "//sdk/fidl/fuchsia.hardware.power.statecontrol:fuchsia.hardware.power.statecontrol_llcpp", |
| "//sdk/lib/fdio", |
| "//src/lib/ddk", |
| "//src/sys/lib/stdout-to-debuglog/cpp", |
| "//zircon/public/lib/fbl", |
| "//zircon/system/ulib/fdio-caller", |
| "//zircon/system/ulib/fzl", |
| "//zircon/system/ulib/hid-parser", |
| ] |
| } |
| |
| component_manifest_resources("bootfs") { |
| sources = [ "meta/pwrbtn-monitor.cml" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ "test:pwrbtn-monitor-integration-test" ] |
| } |