base: Use more specific CHECK macros for comparisons.
[chromium-blink-merge.git] / device / usb / usb.gyp
blobe8785d6224ce6a2910088514a1c8a7a9ab0f9fc1
1 # Copyright 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.
6   'variables': {
7     'chromium_code': 1,
8   },
9   'targets': [
10     {
11       'target_name': 'device_usb',
12       'type': 'static_library',
13       'dependencies': [
14         '../../components/components.gyp:device_event_log_component',
15         '../../net/net.gyp:net',
16         '../../third_party/libusb/libusb.gyp:libusb',
17       ],
18       'include_dirs': [
19         '../..',
20       ],
21       'sources': [
22         'usb_context.cc',
23         'usb_context.h',
24         'usb_descriptors.cc',
25         'usb_descriptors.h',
26         'usb_device_impl.cc',
27         'usb_device_impl.h',
28         'usb_device.h',
29         'usb_device_filter.cc',
30         'usb_device_filter.h',
31         'usb_device_handle_impl.cc',
32         'usb_device_handle_impl.h',
33         'usb_device_handle.h',
34         'usb_error.cc',
35         'usb_error.h',
36         'usb_ids.cc',
37         'usb_ids.h',
38         'usb_service.cc',
39         'usb_service.h',
40         'usb_service_impl.cc',
41         'usb_service_impl.h',
42       ],
43       'actions': [
44         {
45           'action_name': 'generate_usb_ids',
46           'variables': {
47             'usb_ids_path%': '../../third_party/usb_ids/usb.ids',
48             'usb_ids_py_path': 'tools/usb_ids.py',
49           },
50           'inputs': [
51             '<(usb_ids_path)',
52             '<(usb_ids_py_path)',
53           ],
54           'outputs': [
55             '<(SHARED_INTERMEDIATE_DIR)/device/usb/usb_ids_gen.cc',
56           ],
57           'action': [
58             'python',
59             '<(usb_ids_py_path)',
60             '-i', '<(usb_ids_path)',
61             '-o', '<@(_outputs)',
62           ],
63           'process_outputs_as_sources': 1,
64         },
65       ],
66       'conditions': [
67         ['use_udev == 1', {
68           'dependencies': [
69             '../udev_linux/udev.gyp:udev_linux',
70           ],
71         }],
72         ['chromeos==1', {
73           'dependencies': [
74             '../../chromeos/chromeos.gyp:chromeos',
75           ],
76         }],
77       ]
78     },
79   ],