summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-03 22:41:47 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-03 22:41:47 +0000
commit52f5fe716bf5bdd89612235498d73b755b8f862b (patch)
tree15acf7cd253fd5cbc861060be0fdae1dc0f30449
parentbf13278aa566bd6e54b21882820c4426fdf34a5a (diff)
downloadchromium_src-52f5fe716bf5bdd89612235498d73b755b8f862b.zip
chromium_src-52f5fe716bf5bdd89612235498d73b755b8f862b.tar.gz
chromium_src-52f5fe716bf5bdd89612235498d73b755b8f862b.tar.bz2
Add the USB device target to the GN build.
This also renames it to be just "usb" to make it easier to refer to, and uses the output_name to give it the more unique "device_usb" library name. BUG= Review URL: https://codereview.chromium.org/221493002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261554 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--BUILD.gn2
-rw-r--r--device/usb/BUILD.gn (renamed from tools/gn/secondary/device/usb/BUILD.gn)56
2 files changed, 32 insertions, 26 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 57dd5ba..8359890 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -25,7 +25,7 @@ group("root") {
#"//components/translate:translate_core_browser",
#"//components/translate:translate_core_common",
#"//crypto",
- #"//device/usb:device_usb",
+ "//device/usb",
"//ipc",
#"//net",
#"//net/third_party/nss:ssl",
diff --git a/tools/gn/secondary/device/usb/BUILD.gn b/device/usb/BUILD.gn
index 36d499b..d7fa6d0 100644
--- a/tools/gn/secondary/device/usb/BUILD.gn
+++ b/device/usb/BUILD.gn
@@ -1,25 +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("device_usb") {
- sources = [
- "usb_ids.cc",
- "usb_ids.h",
- generated_ids,
- ]
- deps = [ ":device_usb_ids" ]
-}
-
-action("device_usb_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),
- ]
-}
+# 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" ]
+}