mojo: Fix map of booleans for python bindings.
[chromium-blink-merge.git] / device / usb / BUILD.gn
blobe12e74568fb39afd53e7b58de615cc475ac0ab7f
1 # Copyright (c) 2013 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 assert(!is_android && !is_ios)
7 source_ids = "//third_party/usb_ids/usb.ids"
8 generated_ids = "$target_gen_dir/usb_ids_gen.cc"
10 source_set("usb") {
11   sources = [
12     "usb_context.cc",
13     "usb_context.h",
14     "usb_descriptors.cc",
15     "usb_descriptors.h",
16     "usb_device_impl.cc",
17     "usb_device_impl.h",
18     "usb_device.h",
19     "usb_device_filter.cc",
20     "usb_device_filter.h",
21     "usb_device_handle_impl.cc",
22     "usb_device_handle_impl.h",
23     "usb_device_handle.h",
24     "usb_error.cc",
25     "usb_error.h",
26     "usb_ids.cc",
27     "usb_ids.h",
28     "usb_service.h",
29     "usb_service_impl.cc",
30     generated_ids,
31   ]
33   deps = [
34     ":usb_device_ids",
35     "//base",
36     "//base/third_party/dynamic_annotations",
37     "//net",
38     "//third_party/libusb",
39   ]
41   if (is_linux) {
42     configs += [ "//build/config/linux:udev" ]
43   }
46 action("usb_device_ids") {
47   script = "//device/usb/tools/usb_ids.py"
48   inputs = [ source_ids ]
49   outputs = [ generated_ids ]
50   args = [
51     "-i", rebase_path(source_ids,  root_build_dir),
52     "-o", rebase_path(generated_ids, root_build_dir),
53   ]
55   # Only the device_usb target can depend on us.
56   visibility = [ ":usb" ]