1 # Copyright 2017 The Chromium Authors
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/chromeos/ui_mode.gni")
6 import("//build/config/features.gni")
8 if (is_win || ((is_linux || is_tizen || is_chromeos) && use_udev) || is_mac) {
9 config("platform_support") {
10 visibility = [ ":serial" ]
12 libs = [ "setupapi.lib" ]
13 ldflags = [ "/DELAYLOAD:setupapi.dll" ]
17 source_set("serial") {
20 "//services/device:lib",
21 "//services/device:tests",
25 "bluetooth_serial_device_enumerator.cc",
26 "bluetooth_serial_device_enumerator.h",
27 "bluetooth_serial_port_impl.cc",
28 "bluetooth_serial_port_impl.h",
29 "serial_device_enumerator.cc",
30 "serial_device_enumerator.h",
31 "serial_io_handler.cc",
32 "serial_io_handler.h",
33 "serial_port_impl.cc",
35 "serial_port_manager_impl.cc",
36 "serial_port_manager_impl.h",
39 public_configs = [ ":platform_support" ]
41 public_deps = [ "//services/device/public/mojom" ]
45 "//build:chromeos_buildflags",
46 "//components/device_event_log",
47 "//device/bluetooth:bluetooth",
48 "//device/bluetooth/public/cpp",
49 "//mojo/public/cpp/bindings",
51 "//services/device/public/cpp:device_features",
52 "//services/device/public/cpp/bluetooth:bluetooth",
53 "//services/device/public/cpp/serial:switches",
56 if (is_linux || is_chromeos) {
58 "serial_device_enumerator_linux.cc",
59 "serial_device_enumerator_linux.h",
65 "serial_device_enumerator_mac.cc",
66 "serial_device_enumerator_mac.h",
72 "serial_device_enumerator_win.cc",
73 "serial_device_enumerator_win.h",
74 "serial_io_handler_win.cc",
75 "serial_io_handler_win.h",
81 "serial_io_handler_posix.cc",
82 "serial_io_handler_posix.h",
87 deps += [ "//device/udev_linux" ]
90 if (is_chromeos_ash) {
91 deps += [ "//chromeos/dbus/permission_broker" ]
96 "Foundation.framework",
110 "serial_device_enumerator_linux.cc",
111 "serial_device_enumerator_linux.h",
116 static_library("test_support") {
120 "fake_serial_device_enumerator.cc",
121 "fake_serial_device_enumerator.h",