summaryrefslogtreecommitdiffstats
path: root/device/device.gyp
diff options
context:
space:
mode:
authorgdk@chromium.org <gdk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-05 22:41:18 +0000
committergdk@chromium.org <gdk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-05 22:41:18 +0000
commit25d2b1394d6623eabe814c8287c66d4345d2abbe (patch)
tree1a9de6d8738e8330fb9af9158000b40d84ef12bb /device/device.gyp
parent13a016d52277755897c27502160a0bfbfb69e455 (diff)
downloadchromium_src-25d2b1394d6623eabe814c8287c66d4345d2abbe.zip
chromium_src-25d2b1394d6623eabe814c8287c66d4345d2abbe.tar.gz
chromium_src-25d2b1394d6623eabe814c8287c66d4345d2abbe.tar.bz2
Adding USB ID vendor and product lookups.
This change adds a tool for generating the lookup table, a wrapper around the lookup table, and the build infrastructure required to invoke the rule when compiling. BUG=127302 TBR=sky Review URL: https://chromiumcodereview.appspot.com/11344039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171339 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'device/device.gyp')
-rw-r--r--device/device.gyp36
1 files changed, 36 insertions, 0 deletions
diff --git a/device/device.gyp b/device/device.gyp
index 75902fc..08cac92 100644
--- a/device/device.gyp
+++ b/device/device.gyp
@@ -71,11 +71,46 @@
],
},
{
+ 'target_name': 'device_usb',
+ 'type': 'static_library',
+ 'sources': [
+ 'usb/usb_ids.cc',
+ 'usb/usb_ids.h',
+ ],
+ 'include_dirs': [
+ '..',
+ ],
+ 'actions': [
+ {
+ 'action_name': 'generate_usb_ids',
+ 'variables': {
+ 'usb_ids_path%': '<(DEPTH)/third_party/usb_ids/usb.ids',
+ 'usb_ids_py_path': '<(DEPTH)/tools/usb_ids/usb_ids.py',
+ },
+ 'inputs': [
+ '<(usb_ids_path)',
+ '<(usb_ids_py_path)',
+ ],
+ 'outputs': [
+ '<(SHARED_INTERMEDIATE_DIR)/device/usb/usb_ids_gen.cc',
+ ],
+ 'action': [
+ 'python',
+ '<(usb_ids_py_path)',
+ '-i', '<(usb_ids_path)',
+ '-o', '<@(_outputs)',
+ ],
+ 'process_outputs_as_sources': 1,
+ },
+ ],
+ },
+ {
'target_name': 'device_unittests',
'type': '<(gtest_target_type)',
'dependencies': [
'device_bluetooth',
'device_bluetooth_mocks',
+ 'device_usb',
'../base/base.gyp:test_support_base',
'../content/content.gyp:test_support_content',
'../testing/gmock.gyp:gmock',
@@ -90,6 +125,7 @@
'test/device_test_suite.cc',
'test/device_test_suite.h',
'test/run_all_unittests.cc',
+ 'usb/usb_ids_unittest.cc',
],
'conditions': [
['chromeos==1', {