Fix build break
[chromium-blink-merge.git] / device / device.gyp
blobbd0cd3d882f6552044e073e0d99972086728d3c1
1 # Copyright (c) 2012 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_bluetooth',
12       'type': 'static_library',
13       'dependencies': [
14         'device_bluetooth_strings.gyp:device_bluetooth_strings',
15         '../base/base.gyp:base',
16         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
17         '../net/net.gyp:net',
18         '../third_party/libxml/libxml.gyp:libxml',
19         '../ui/ui.gyp:ui'
20       ],
21       'sources': [
22         'bluetooth/bluetooth_adapter.cc',
23         'bluetooth/bluetooth_adapter.h',
24         'bluetooth/bluetooth_adapter_chromeos.cc',
25         'bluetooth/bluetooth_adapter_chromeos.h',
26         'bluetooth/bluetooth_adapter_experimental_chromeos.cc',
27         'bluetooth/bluetooth_adapter_experimental_chromeos.h',
28         'bluetooth/bluetooth_adapter_factory.cc',
29         'bluetooth/bluetooth_adapter_factory.h',
30         'bluetooth/bluetooth_adapter_mac.h',
31         'bluetooth/bluetooth_adapter_mac.mm',
32         'bluetooth/bluetooth_adapter_win.cc',
33         'bluetooth/bluetooth_adapter_win.h',
34         'bluetooth/bluetooth_device.cc',
35         'bluetooth/bluetooth_device.h',
36         'bluetooth/bluetooth_device_chromeos.cc',
37         'bluetooth/bluetooth_device_chromeos.h',
38         'bluetooth/bluetooth_device_mac.h',
39         'bluetooth/bluetooth_device_mac.mm',
40         'bluetooth/bluetooth_device_win.cc',
41         'bluetooth/bluetooth_device_win.h',
42         'bluetooth/bluetooth_init_win.cc',
43         'bluetooth/bluetooth_init_win.h',
44         'bluetooth/bluetooth_out_of_band_pairing_data.h',
45         'bluetooth/bluetooth_service_record.cc',
46         'bluetooth/bluetooth_service_record.h',
47         'bluetooth/bluetooth_service_record_chromeos.cc',
48         'bluetooth/bluetooth_service_record_chromeos.h',
49         'bluetooth/bluetooth_service_record_mac.h',
50         'bluetooth/bluetooth_service_record_mac.mm',
51         'bluetooth/bluetooth_service_record_win.cc',
52         'bluetooth/bluetooth_service_record_win.h',
53         'bluetooth/bluetooth_socket.h',
54         'bluetooth/bluetooth_socket_chromeos.cc',
55         'bluetooth/bluetooth_socket_chromeos.h',
56         'bluetooth/bluetooth_socket_mac.h',
57         'bluetooth/bluetooth_socket_mac.mm',
58         'bluetooth/bluetooth_socket_win.cc',
59         'bluetooth/bluetooth_socket_win.h',
60         'bluetooth/bluetooth_task_manager_win.cc',
61         'bluetooth/bluetooth_task_manager_win.h',
62         'bluetooth/bluetooth_utils.cc',
63         'bluetooth/bluetooth_utils.h',
64       ],
65       'conditions': [
66         ['chromeos==1', {
67           'dependencies': [
68             '../build/linux/system.gyp:dbus',
69             '../chromeos/chromeos.gyp:chromeos',
70             '../dbus/dbus.gyp:dbus',
71           ]
72         }],
73         ['OS=="win"', {
74           'all_dependent_settings': {
75             'msvs_settings': {
76               'VCLinkerTool': {
77                 'DelayLoadDLLs': [
78                   # Despite MSDN stating that Bthprops.dll contains the
79                   # symbols declared by bthprops.lib, they actually reside here:
80                   'Bthprops.cpl',
81                 ],
82               },
83             },
84           },
85         }],
86         ['OS=="mac"', {
87           'link_settings': {
88             'libraries': [
89               '$(SDKROOT)/System/Library/Frameworks/IOBluetooth.framework',
90             ],
91           },
92         }],
93       ],
94     },
95     {
96       'target_name': 'device_bluetooth_mocks',
97       'type': 'static_library',
98       'dependencies': [
99         'device_bluetooth',
100         '../testing/gmock.gyp:gmock',
101       ],
102       'sources': [
103         'bluetooth/test/mock_bluetooth_adapter.cc',
104         'bluetooth/test/mock_bluetooth_adapter.h',
105         'bluetooth/test/mock_bluetooth_device.cc',
106         'bluetooth/test/mock_bluetooth_device.h',
107         'bluetooth/test/mock_bluetooth_socket.cc',
108         'bluetooth/test/mock_bluetooth_socket.h',
109       ],
110       'include_dirs': [
111         '..',
112       ],
113     },
114     {
115       'target_name': 'device_usb',
116       'type': 'static_library',
117       'sources': [
118         'usb/usb_ids.cc',
119         'usb/usb_ids.h',
120       ],
121       'include_dirs': [
122         '..',
123       ],
124       'actions': [
125         {
126           'action_name': 'generate_usb_ids',
127           'variables': {
128             'usb_ids_path%': '<(DEPTH)/third_party/usb_ids/usb.ids',
129             'usb_ids_py_path': '<(DEPTH)/tools/usb_ids/usb_ids.py',
130           },
131           'inputs': [
132             '<(usb_ids_path)',
133             '<(usb_ids_py_path)',
134           ],
135           'outputs': [
136             '<(SHARED_INTERMEDIATE_DIR)/device/usb/usb_ids_gen.cc',
137           ],
138           'action': [
139             'python',
140             '<(usb_ids_py_path)',
141             '-i', '<(usb_ids_path)',
142             '-o', '<@(_outputs)',
143           ],
144           'process_outputs_as_sources': 1,
145         },
146       ],
147     },
148     {
149       'target_name': 'device_unittests',
150       'type': '<(gtest_target_type)',
151       'dependencies': [
152         'device_bluetooth',
153         'device_bluetooth_mocks',
154         'device_usb',
155         '../base/base.gyp:test_support_base',
156         '../testing/gmock.gyp:gmock',
157         '../testing/gtest.gyp:gtest',
158       ],
159       'sources': [
160         'bluetooth/bluetooth_adapter_chromeos_unittest.cc',
161         'bluetooth/bluetooth_adapter_devices_chromeos_unittest.cc',
162         'bluetooth/bluetooth_adapter_mac_unittest.mm',
163         'bluetooth/bluetooth_adapter_win_unittest.cc',
164         'bluetooth/bluetooth_device_win_unittest.cc',
165         'bluetooth/bluetooth_service_record_chromeos_unittest.cc',
166         'bluetooth/bluetooth_service_record_mac_unittest.mm',
167         'bluetooth/bluetooth_service_record_win_unittest.cc',
168         'bluetooth/bluetooth_task_manager_win_unittest.cc',
169         'bluetooth/bluetooth_utils_unittest.cc',
170         'test/run_all_unittests.cc',
171         'usb/usb_ids_unittest.cc',
172       ],
173       'conditions': [
174         ['chromeos==1', {
175           'dependencies': [
176             '../build/linux/system.gyp:dbus',
177             '../chromeos/chromeos.gyp:chromeos_test_support',
178             '../dbus/dbus.gyp:dbus',
179           ]
180         }],
181         ['OS=="mac"', {
182           'link_settings': {
183             'libraries': [
184               '$(SDKROOT)/System/Library/Frameworks/IOBluetooth.framework',
185             ],
186           },
187         }],
188         ['os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
189           'conditions': [
190             ['linux_use_tcmalloc == 1', {
191               'dependencies': [
192                 '../base/allocator/allocator.gyp:allocator',
193               ],
194             }],
195           ],
196         }],
197       ],
198     },
199   ],
200   'conditions': [
201     ['OS=="linux"', {
202       'targets': [
203         {
204           # Protobuf compiler / generator for the MtpFileEntry and
205           # MtpFileEntries protocol buffers.
206           'target_name': 'mtp_file_entry_proto',
207           'type': 'static_library',
208           'sources': [
209             '../third_party/cros_system_api/dbus/mtp_file_entry.proto',
210           ],
211           'variables': {
212             'proto_in_dir': '../third_party/cros_system_api/dbus',
213             'proto_out_dir': 'device/media_transfer_protocol',
214           },
215           'includes': ['../build/protoc.gypi'],
216         },
217         {
218           # Protobuf compiler / generator for the MtpStorageInfo protocol
219           # buffer.
220           'target_name': 'mtp_storage_info_proto',
221           'type': 'static_library',
222           'sources': [
223             '../third_party/cros_system_api/dbus/mtp_storage_info.proto',
224           ],
225           'variables': {
226             'proto_in_dir': '../third_party/cros_system_api/dbus',
227             'proto_out_dir': 'device/media_transfer_protocol',
228           },
229           'includes': ['../build/protoc.gypi'],
230         },
231         {
232           'target_name': 'device_media_transfer_protocol',
233           'type': 'static_library',
234           'dependencies': [
235             '../build/linux/system.gyp:dbus',
236             'mtp_file_entry_proto',
237             'mtp_storage_info_proto',
238           ],
239           'sources': [
240             'media_transfer_protocol/media_transfer_protocol_daemon_client.cc',
241             'media_transfer_protocol/media_transfer_protocol_daemon_client.h',
242             'media_transfer_protocol/media_transfer_protocol_manager.cc',
243             'media_transfer_protocol/media_transfer_protocol_manager.h',
244           ],
245         },
246       ],
247     }],
248   ],