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("//build/config/features.gni") | 5 import("//build/config/features.gni") |
6 import("//mojo/public/tools/bindings/mojom.gni") | 6 import("//mojo/public/tools/bindings/mojom.gni") |
7 | 7 |
8 # Library works only on desktop platforms. | 8 # Library works only on desktop platforms. |
9 assert(is_win || is_linux || is_mac) | 9 assert(is_win || is_linux || is_mac) |
10 | 10 |
| 11 config("platform_support") { |
| 12 visibility = [ ":serial" ] |
| 13 if (is_win) { |
| 14 libs = [ "setupapi.lib" ] |
| 15 ldflags = [ "/DELAYLOAD:setupapi.dll" ] |
| 16 } |
| 17 } |
| 18 |
11 # GYP version: device/serial/serial.gyp:device_serial | 19 # GYP version: device/serial/serial.gyp:device_serial |
12 static_library("serial") { | 20 static_library("serial") { |
13 output_name = "device_serial" | 21 output_name = "device_serial" |
14 | 22 |
15 sources = [ | 23 sources = [ |
16 "buffer.cc", | 24 "buffer.cc", |
17 "buffer.h", | 25 "buffer.h", |
18 "data_receiver.cc", | 26 "data_receiver.cc", |
19 "data_receiver.h", | 27 "data_receiver.h", |
20 "data_sender.cc", | 28 "data_sender.cc", |
(...skipping 17 matching lines...) Expand all Loading... |
38 "serial_io_handler.cc", | 46 "serial_io_handler.cc", |
39 "serial_io_handler.h", | 47 "serial_io_handler.h", |
40 "serial_io_handler_posix.cc", | 48 "serial_io_handler_posix.cc", |
41 "serial_io_handler_posix.h", | 49 "serial_io_handler_posix.h", |
42 "serial_io_handler_win.cc", | 50 "serial_io_handler_win.cc", |
43 "serial_io_handler_win.h", | 51 "serial_io_handler_win.h", |
44 "serial_service_impl.cc", | 52 "serial_service_impl.cc", |
45 "serial_service_impl.h", | 53 "serial_service_impl.h", |
46 ] | 54 ] |
47 | 55 |
| 56 public_configs = [ ":platform_support" ] |
| 57 |
48 public_deps = [ | 58 public_deps = [ |
49 ":serial_mojo", | 59 ":serial_mojo", |
50 "//base", | 60 "//base", |
51 "//device/core", | 61 "//device/core", |
52 ] | 62 ] |
| 63 |
53 deps = [ | 64 deps = [ |
54 "//mojo/public/cpp/system", | 65 "//mojo/public/cpp/system", |
55 "//net", | 66 "//net", |
56 "//third_party/re2", | 67 "//third_party/re2", |
57 ] | 68 ] |
58 | 69 |
59 if (use_udev) { | 70 if (use_udev) { |
60 deps += [ "//device/udev_linux" ] | 71 deps += [ "//device/udev_linux" ] |
61 } | 72 } |
62 if (is_chromeos) { | 73 if (is_chromeos) { |
(...skipping 23 matching lines...) Expand all Loading... |
86 "//extensions:extensions_renderer_resources_grit", | 97 "//extensions:extensions_renderer_resources_grit", |
87 ] | 98 ] |
88 | 99 |
89 sources = [ | 100 sources = [ |
90 "data_stream.mojom", | 101 "data_stream.mojom", |
91 "data_stream_serialization.mojom", | 102 "data_stream_serialization.mojom", |
92 "serial.mojom", | 103 "serial.mojom", |
93 "serial_serialization.mojom", | 104 "serial_serialization.mojom", |
94 ] | 105 ] |
95 } | 106 } |
OLD | NEW |