summaryrefslogtreecommitdiffstats
path: root/device/usb/BUILD.gn
diff options
context:
space:
mode:
Diffstat (limited to 'device/usb/BUILD.gn')
-rw-r--r--device/usb/BUILD.gn31
1 files changed, 31 insertions, 0 deletions
diff --git a/device/usb/BUILD.gn b/device/usb/BUILD.gn
new file mode 100644
index 0000000..d7fa6d0
--- /dev/null
+++ b/device/usb/BUILD.gn
@@ -0,0 +1,31 @@
+# Copyright (c) 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+source_ids = "//third_party/usb_ids/usb.ids"
+generated_ids = "$target_gen_dir/usb_ids_gen.cc"
+
+static_library("usb") {
+ output_name = "device_usb"
+ sources = [
+ "usb_ids.cc",
+ "usb_ids.h",
+ generated_ids,
+ ]
+ deps = [ ":usb_device_ids" ]
+}
+
+action("usb_device_ids") {
+ script = "//tools/usb_ids/usb_ids.py"
+ source_prereqs = [ source_ids ]
+ outputs = [ generated_ids ]
+ args = [
+ "-i", rebase_path(source_ids, root_build_dir),
+ "-o", rebase_path(generated_ids, root_build_dir),
+ ]
+
+ # Only the device_usb target can depend on us.
+ # TODO(brettw) uncomment this when visibility is implemented in the pushed
+ # GN binary.
+ #visibility = [ ":usb" ]
+}