| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//tools/grit/grit_rule.gni") | 5 import("//tools/grit/grit_rule.gni") |
| 6 | 6 |
| 7 if (is_android) { |
| 8 import("//build/config/android/rules.gni") # For generate_jni(). |
| 9 } |
| 10 |
| 7 config("bluetooth_config") { | 11 config("bluetooth_config") { |
| 8 if (is_win) { | 12 if (is_win) { |
| 9 ldflags = [ | 13 ldflags = [ |
| 10 "/DELAYLOAD:BluetoothApis.dll", | 14 "/DELAYLOAD:BluetoothApis.dll", |
| 11 | 15 |
| 12 # Despite MSDN stating that Bthprops.dll contains the | 16 # Despite MSDN stating that Bthprops.dll contains the |
| 13 # symbols declared by bthprops.lib, they actually reside here: | 17 # symbols declared by bthprops.lib, they actually reside here: |
| 14 "/DELAYLOAD:Bthprops.cpl", | 18 "/DELAYLOAD:Bthprops.cpl", |
| 15 "/DELAYLOAD:setupapi.dll", | 19 "/DELAYLOAD:setupapi.dll", |
| 16 ] | 20 ] |
| 17 } | 21 } |
| 18 } | 22 } |
| 19 | 23 |
| 20 component("bluetooth") { | 24 component("bluetooth") { |
| 21 sources = [ | 25 sources = [ |
| 26 "android/bluetooth_jni_registrar.cc", |
| 27 "android/bluetooth_jni_registrar.h", |
| 22 "bluetooth_adapter.cc", | 28 "bluetooth_adapter.cc", |
| 23 "bluetooth_adapter.h", | 29 "bluetooth_adapter.h", |
| 24 "bluetooth_adapter_android.cc", | 30 "bluetooth_adapter_android.cc", |
| 25 "bluetooth_adapter_android.h", | 31 "bluetooth_adapter_android.h", |
| 26 "bluetooth_adapter_chromeos.cc", | 32 "bluetooth_adapter_chromeos.cc", |
| 27 "bluetooth_adapter_chromeos.h", | 33 "bluetooth_adapter_chromeos.h", |
| 28 "bluetooth_adapter_factory.cc", | 34 "bluetooth_adapter_factory.cc", |
| 29 "bluetooth_adapter_factory.h", | 35 "bluetooth_adapter_factory.h", |
| 30 "bluetooth_adapter_mac.h", | 36 "bluetooth_adapter_mac.h", |
| 31 "bluetooth_adapter_mac.mm", | 37 "bluetooth_adapter_mac.mm", |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 all_dependent_configs = [ ":bluetooth_config" ] | 122 all_dependent_configs = [ ":bluetooth_config" ] |
| 117 | 123 |
| 118 deps = [ | 124 deps = [ |
| 119 ":strings", | 125 ":strings", |
| 120 "uribeacon", | 126 "uribeacon", |
| 121 "//base", | 127 "//base", |
| 122 "//net", | 128 "//net", |
| 123 "//ui/base", | 129 "//ui/base", |
| 124 ] | 130 ] |
| 125 | 131 |
| 126 if (is_win) { | 132 if (is_android) { |
| 127 libs = [ "setupapi.lib" ] | 133 deps += [ ":bluetooth_jni" ] |
| 128 } else if (is_chromeos) { | 134 } |
| 135 |
| 136 if (is_chromeos) { |
| 129 deps += [ | 137 deps += [ |
| 130 "//chromeos", | 138 "//chromeos", |
| 131 "//dbus", | 139 "//dbus", |
| 132 ] | 140 ] |
| 133 } | 141 } |
| 134 | 142 |
| 135 if (is_mac) { | 143 if (is_mac) { |
| 136 libs = [ "IOBluetooth.framework" ] | 144 libs = [ "IOBluetooth.framework" ] |
| 137 } | 145 } |
| 146 |
| 147 if (is_win) { |
| 148 libs = [ "setupapi.lib" ] |
| 149 } |
| 138 } | 150 } |
| 139 | 151 |
| 140 grit("strings") { | 152 grit("strings") { |
| 141 source = "bluetooth_strings.grd" | 153 source = "bluetooth_strings.grd" |
| 142 outputs = [ | 154 outputs = [ |
| 143 "grit/device_bluetooth_strings.h", | 155 "grit/device_bluetooth_strings.h", |
| 144 "device_bluetooth_strings_am.pak", | 156 "device_bluetooth_strings_am.pak", |
| 145 "device_bluetooth_strings_ar.pak", | 157 "device_bluetooth_strings_ar.pak", |
| 146 "device_bluetooth_strings_bg.pak", | 158 "device_bluetooth_strings_bg.pak", |
| 147 "device_bluetooth_strings_bn.pak", | 159 "device_bluetooth_strings_bn.pak", |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 "test/mock_bluetooth_socket.h", | 233 "test/mock_bluetooth_socket.h", |
| 222 ] | 234 ] |
| 223 | 235 |
| 224 deps = [ | 236 deps = [ |
| 225 ":bluetooth", | 237 ":bluetooth", |
| 226 "//base", | 238 "//base", |
| 227 "//net", | 239 "//net", |
| 228 "//testing/gmock", | 240 "//testing/gmock", |
| 229 ] | 241 ] |
| 230 } | 242 } |
| 243 |
| 244 if (is_android) { |
| 245 generate_jni("bluetooth_jni") { |
| 246 sources = [ |
| 247 "android/java/src/org/chromium/device/bluetooth/BluetoothAdapter.java", |
| 248 ] |
| 249 jni_package = "bluetooth" |
| 250 } |
| 251 } |
| OLD | NEW |