Enable find-missing-symbols-at-link-time for chromeos builds too.
[chromium-blink-merge.git] / device / battery / BUILD.gn
blob778ee81b2e6bc9e4653637e5af452b5a6f08ce11
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/features.gni")
6 import("//third_party/mojo/src/mojo/public/tools/bindings/mojom.gni")
8 component("battery") {
9   output_name = "device_battery"
11   sources = [
12     "battery_export.h",
13     "battery_monitor_impl.cc",
14     "battery_monitor_impl.h",
15     "battery_status_manager_chromeos.cc",
16     "battery_status_manager_default.cc",
17     "battery_status_manager_linux.cc",
18     "battery_status_manager_linux.h",
19     "battery_status_manager_mac.cc",
20     "battery_status_manager_win.cc",
21     "battery_status_manager_win.h",
22     "battery_status_service.cc",
23     "battery_status_service.h",
24   ]
26   defines = [ "DEVICE_BATTERY_IMPLEMENTATION" ]
28   deps = [
29     ":mojo_bindings",
30     "//base",
31     "//base/third_party/dynamic_annotations",
32     "//mojo/environment:chromium",
33     "//third_party/mojo/src/mojo/public/cpp/bindings",
34     "//third_party/mojo/src/mojo/edk/system",
35   ]
37   if (is_chromeos) {
38     configs += [ "//build/config/linux:dbus" ]
39     deps += [
40       "//chromeos:chromeos",
41       "//chromeos:power_manager_proto",
42     ]
43     sources -= [
44       "battery_status_manager_default.cc",
45       "battery_status_manager_linux.cc",
46     ]
47   }
49   if (is_desktop_linux) {
50     if (use_dbus) {
51       configs += [ "//build/config/linux:dbus" ]
52       deps += [ "//dbus" ]
53       sources -= [ "battery_status_manager_default.cc" ]
54     } else {
55       sources -= [ "battery_status_manager_linux.cc" ]
56     }
57   }
59   if (is_mac) {
60     sources -= [ "battery_status_manager_default.cc" ]
61   }
63   if (is_win) {
64     sources -= [ "battery_status_manager_default.cc" ]
65   }
68 mojom("mojo_bindings") {
69   sources = [
70     "battery_monitor.mojom",
71     "battery_status.mojom",
72   ]