Refactor WebsiteSettings to operate on a SecurityInfo
[chromium-blink-merge.git] / device / usb / usb.gyp
blob1d3493f8c81511d35d210b946ada595c2838b978
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.cc',
29         'usb_device.h',
30         'usb_device_filter.cc',
31         'usb_device_filter.h',
32         'usb_device_handle_impl.cc',
33         'usb_device_handle_impl.h',
34         'usb_device_handle.cc',
35         'usb_device_handle.h',
36         'usb_error.cc',
37         'usb_error.h',
38         'usb_ids.cc',
39         'usb_ids.h',
40         'usb_service.cc',
41         'usb_service.h',
42         'usb_service_impl.cc',
43         'usb_service_impl.h',
44         'webusb_descriptors.cc',
45         'webusb_descriptors.h',
46       ],
47       'actions': [
48         {
49           'action_name': 'generate_usb_ids',
50           'variables': {
51             'usb_ids_path%': '../../third_party/usb_ids/usb.ids',
52             'usb_ids_py_path': 'tools/usb_ids.py',
53           },
54           'inputs': [
55             '<(usb_ids_path)',
56             '<(usb_ids_py_path)',
57           ],
58           'outputs': [
59             '<(SHARED_INTERMEDIATE_DIR)/device/usb/usb_ids_gen.cc',
60           ],
61           'action': [
62             'python',
63             '<(usb_ids_py_path)',
64             '-i', '<(usb_ids_path)',
65             '-o', '<@(_outputs)',
66           ],
67           'process_outputs_as_sources': 1,
68         },
69       ],
70       'conditions': [
71         ['use_udev == 1', {
72           'dependencies': [
73             '../udev_linux/udev.gyp:udev_linux',
74           ],
75         }],
76         ['chromeos==1', {
77           'dependencies': [
78             '../../chromeos/chromeos.gyp:chromeos',
79           ],
80         }],
81       ]
82     },
83     {
84       'target_name': 'device_usb_mocks',
85       'type': 'static_library',
86       'include_dirs': [
87         '../..',
88       ],
89       'dependencies': [
90         '../../testing/gmock.gyp:gmock',
91         'device_usb',
92       ],
93       'sources': [
94         'mock_usb_device.cc',
95         'mock_usb_device.h',
96         'mock_usb_device_handle.cc',
97         'mock_usb_device_handle.h',
98         'mock_usb_service.cc',
99         'mock_usb_service.h',
100       ],
101     },
102   ],