Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Unified Diff: device/device.gyp

Issue 11344039: Adding USB ID vendor and product lookups. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding use_system_usbutils option. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_browser_extensions.gypi ('k') | device/usb/usb_ids.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/device.gyp
diff --git a/device/device.gyp b/device/device.gyp
index d1f27e4f15728d21b58a6093b2c33376f563ccf6..a026b1728adc8653a7937bfdb03d792bc30f11af 100644
--- a/device/device.gyp
+++ b/device/device.gyp
@@ -5,6 +5,7 @@
{
'variables': {
'chromium_code': 1,
+ 'use_system_usbutils%': 0,
Paweł Hajdan Jr. 2012/10/31 19:03:21 nit: This won't be needed with my other comment. :
},
'targets': [
{
@@ -69,11 +70,53 @@
],
},
{
+ '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',
+ },
+ 'conditions': [
+ ['use_system_usbutils==1', {
+ 'variables': {
+ 'usb_ids_path': '/var/lib/usbutils/usb.ids',
Paweł Hajdan Jr. 2012/10/31 19:03:21 nit: You can just let distros configure gyp with t
+ },
+ }],
+ ],
+ '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',
@@ -87,6 +130,7 @@
'test/device_test_suite.cc',
'test/device_test_suite.h',
'test/run_all_unittests.cc',
+ 'usb/usb_ids_unittest.cc',
],
'conditions': [
['chromeos==1', {
« no previous file with comments | « chrome/chrome_browser_extensions.gypi ('k') | device/usb/usb_ids.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698