naiveproxy/services/device/battery/BUILD.gn
2018-12-09 21:59:24 -05:00

77 lines
2.0 KiB
Plaintext

# Copyright 2014 The Chromium 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/config/features.gni")
import("//mojo/public/tools/bindings/mojom.gni")
# On android, BatteryManager mojo interface is implemented directly in Java.
if (!is_android) {
source_set("battery") {
visibility = [
"//services/device:lib",
"//services/device:tests",
]
sources = [
"battery_monitor_impl.cc",
"battery_monitor_impl.h",
"battery_status_manager.h",
"battery_status_manager_chromeos.cc",
"battery_status_manager_default.cc",
"battery_status_manager_linux-inl.h",
"battery_status_manager_linux.cc",
"battery_status_manager_linux.h",
"battery_status_manager_mac.cc",
"battery_status_manager_win.cc",
"battery_status_manager_win.h",
"battery_status_service.cc",
"battery_status_service.h",
]
public_deps = [
"//services/device/public/mojom",
]
deps = [
"//base",
"//base/third_party/dynamic_annotations",
"//mojo/public/cpp/bindings",
]
if (is_chromeos) {
configs += [ "//build/config/linux/dbus" ]
deps += [
"//chromeos:chromeos",
"//chromeos:power_manager_proto",
]
sources -= [
"battery_status_manager_default.cc",
"battery_status_manager_linux.cc",
]
}
if (is_linux && !is_chromeos) {
if (use_dbus) {
configs += [ "//build/config/linux/dbus" ]
deps += [ "//dbus" ]
sources -= [ "battery_status_manager_default.cc" ]
} else {
sources -= [ "battery_status_manager_linux.cc" ]
}
}
if (is_mac) {
sources -= [ "battery_status_manager_default.cc" ]
libs = [
"CoreFoundation.framework",
"IOKit.framework",
]
}
if (is_win) {
sources -= [ "battery_status_manager_default.cc" ]
}
}
}