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