Extensions: Store disable reasons in Sync
[chromium-blink-merge.git] / device / bluetooth / bluetooth.gyp
blobd36a2cec41b94bbf30c10fc2c6eea2aa758a711e
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       # GN version: //device/bluetooth
12       'target_name': 'device_bluetooth',
13       'type': '<(component)',
14       'dependencies': [
15         '../../base/base.gyp:base',
16         '../../net/net.gyp:net',
17         '../../ui/base/ui_base.gyp:ui_base',
18         'bluetooth_strings.gyp:device_bluetooth_strings',
19         'uribeacon',
20       ],
21       'defines': [
22         'DEVICE_BLUETOOTH_IMPLEMENTATION',
23       ],
24       'sources': [
25         # Note: file list duplicated in GN build.
26         'bluetooth_adapter.cc',
27         'bluetooth_adapter.h',
28         'bluetooth_adapter_android.cc',
29         'bluetooth_adapter_android.h',
30         'bluetooth_adapter_chromeos.cc',
31         'bluetooth_adapter_chromeos.h',
32         'bluetooth_adapter_factory.cc',
33         'bluetooth_adapter_factory.h',
34         'bluetooth_adapter_mac.h',
35         'bluetooth_adapter_mac.mm',
36         "bluetooth_adapter_profile_chromeos.cc",
37         "bluetooth_adapter_profile_chromeos.h",
38         'bluetooth_adapter_win.cc',
39         'bluetooth_adapter_win.h',
40         'bluetooth_advertisement.cc',
41         'bluetooth_advertisement.h',
42         'bluetooth_advertisement_chromeos.cc',
43         'bluetooth_advertisement_chromeos.h',
44         'bluetooth_audio_sink.cc',
45         'bluetooth_audio_sink.h',
46         'bluetooth_audio_sink_chromeos.cc',
47         'bluetooth_audio_sink_chromeos.h',
48         'bluetooth_channel_mac.mm',
49         'bluetooth_channel_mac.h',
50         'bluetooth_device.cc',
51         'bluetooth_device.h',
52         'bluetooth_device_chromeos.cc',
53         'bluetooth_device_chromeos.h',
54         'bluetooth_device_mac.h',
55         'bluetooth_device_mac.mm',
56         'bluetooth_device_win.cc',
57         'bluetooth_device_win.h',
58         'bluetooth_discovery_manager_mac.mm',
59         'bluetooth_discovery_manager_mac.h',
60         'bluetooth_discovery_session.cc',
61         'bluetooth_discovery_session.h',
62         'bluetooth_gatt_characteristic.cc',
63         'bluetooth_gatt_characteristic.h',
64         'bluetooth_gatt_connection.cc',
65         'bluetooth_gatt_connection.h',
66         'bluetooth_gatt_connection_chromeos.cc',
67         'bluetooth_gatt_connection_chromeos.h',
68         'bluetooth_gatt_descriptor.cc',
69         'bluetooth_gatt_descriptor.h',
70         'bluetooth_gatt_notify_session.cc',
71         'bluetooth_gatt_notify_session.h',
72         'bluetooth_gatt_notify_session_chromeos.cc',
73         'bluetooth_gatt_notify_session_chromeos.h',
74         'bluetooth_gatt_service.cc',
75         'bluetooth_gatt_service.h',
76         'bluetooth_init_win.cc',
77         'bluetooth_init_win.h',
78         'bluetooth_l2cap_channel_mac.mm',
79         'bluetooth_l2cap_channel_mac.h',
80         'bluetooth_low_energy_defs_win.cc',
81         'bluetooth_low_energy_defs_win.h',
82         'bluetooth_low_energy_device_mac.h',
83         'bluetooth_low_energy_device_mac.mm',
84         'bluetooth_low_energy_discovery_manager_mac.h',
85         'bluetooth_low_energy_discovery_manager_mac.mm',
86         'bluetooth_low_energy_win.cc',
87         'bluetooth_low_energy_win.h',
88         'bluetooth_pairing_chromeos.cc',
89         'bluetooth_pairing_chromeos.h',
90         'bluetooth_remote_gatt_characteristic_chromeos.cc',
91         'bluetooth_remote_gatt_characteristic_chromeos.h',
92         'bluetooth_remote_gatt_descriptor_chromeos.cc',
93         'bluetooth_remote_gatt_descriptor_chromeos.h',
94         'bluetooth_remote_gatt_service_chromeos.cc',
95         'bluetooth_remote_gatt_service_chromeos.h',
96         'bluetooth_rfcomm_channel_mac.mm',
97         'bluetooth_rfcomm_channel_mac.h',
98         'bluetooth_service_record_win.cc',
99         'bluetooth_service_record_win.h',
100         'bluetooth_socket.cc',
101         'bluetooth_socket.h',
102         'bluetooth_socket_chromeos.cc',
103         'bluetooth_socket_chromeos.h',
104         'bluetooth_socket_mac.h',
105         'bluetooth_socket_mac.mm',
106         'bluetooth_socket_net.cc',
107         'bluetooth_socket_net.h',
108         'bluetooth_socket_thread.cc',
109         'bluetooth_socket_thread.h',
110         'bluetooth_socket_win.cc',
111         'bluetooth_socket_win.h',
112         'bluetooth_task_manager_win.cc',
113         'bluetooth_task_manager_win.h',
114         'bluetooth_uuid.cc',
115         'bluetooth_uuid.h',
116       ],
117       'conditions': [
118         ['chromeos==1', {
119           'dependencies': [
120             '../../build/linux/system.gyp:dbus',
121             '../../chromeos/chromeos.gyp:chromeos',
122             '../../dbus/dbus.gyp:dbus',
123           ],
124           'export_dependent_settings': [
125             '../../build/linux/system.gyp:dbus'
126           ]
127         }],
128         ['OS == "android"', {
129           'dependencies': [
130             'device_bluetooth_jni_headers',
131           ],
132           'sources': [
133             'android/bluetooth_jni_registrar.cc',
134             'android/bluetooth_jni_registrar.h',
135           ],
136         }],
137         ['OS=="win"', {
138           # The following two blocks are duplicated. They apply to static lib
139           # and shared lib configurations respectively.
140           'all_dependent_settings': {  # For static lib, apply to dependents.
141             'msvs_settings': {
142               'VCLinkerTool': {
143                 'DelayLoadDLLs': [
144                   'BluetoothApis.dll',
145                   # Despite MSDN stating that Bthprops.dll contains the
146                   # symbols declared by bthprops.lib, they actually reside here:
147                   'Bthprops.cpl',
148                   'setupapi.dll',
149                 ],
150               },
151             },
152           },
153           'msvs_settings': {  # For shared lib, apply to self.
154             'VCLinkerTool': {
155               'DelayLoadDLLs': [
156                 'BluetoothApis.dll',
157                 # Despite MSDN stating that Bthprops.dll contains the
158                 # symbols declared by bthprops.lib, they actually reside here:
159                 'Bthprops.cpl',
160                 'setupapi.dll',
161               ],
162             },
163           },
164         }],
165         ['OS=="mac"', {
166           'link_settings': {
167             'libraries': [
168               '$(SDKROOT)/System/Library/Frameworks/IOBluetooth.framework',
169             ],
170             'conditions': [
171               ['mac_sdk == "10.10"', {
172                 'xcode_settings': {
173                   # In the OSX 10.10 SDK, CoreBluetooth became a top level
174                   # framework. Previously, it was nested in IOBluetooth. In
175                   # order for Chrome to run on OSes older than OSX 10.10, the
176                   # top level CoreBluetooth framework must be weakly linked.
177                   'OTHER_LDFLAGS': [
178                     '-weak_framework CoreBluetooth',
179                   ],
180                 },
181               }],
182             ],
183           },
184         }],
185       ],
186     },
187     {
188       # GN version: //device/bluetooth/uribeacon
189       'target_name': 'uribeacon',
190       'type': 'static_library',
191       'dependencies': [
192         '../../base/base.gyp:base',
193       ],
194       'sources': [
195         'uribeacon/uri_encoder.cc',
196         'uribeacon/uri_encoder.h'
197       ]
198     },
199     {
200       # GN version: //device/bluetooth:mocks
201       'target_name': 'device_bluetooth_mocks',
202       'type': 'static_library',
203       'dependencies': [
204         '../../testing/gmock.gyp:gmock',
205         'device_bluetooth',
206       ],
207       'include_dirs': [
208         '../../',
209       ],
210       'sources': [
211         # Note: file list duplicated in GN build.
212         'test/mock_bluetooth_adapter.cc',
213         'test/mock_bluetooth_adapter.h',
214         'test/mock_bluetooth_advertisement.cc',
215         'test/mock_bluetooth_advertisement.h',
216         'test/mock_bluetooth_device.cc',
217         'test/mock_bluetooth_device.h',
218         'test/mock_bluetooth_discovery_session.cc',
219         'test/mock_bluetooth_discovery_session.h',
220         'test/mock_bluetooth_gatt_characteristic.cc',
221         'test/mock_bluetooth_gatt_characteristic.h',
222         'test/mock_bluetooth_gatt_connection.cc',
223         'test/mock_bluetooth_gatt_connection.h',
224         'test/mock_bluetooth_gatt_descriptor.cc',
225         'test/mock_bluetooth_gatt_descriptor.h',
226         'test/mock_bluetooth_gatt_notify_session.cc',
227         'test/mock_bluetooth_gatt_notify_session.h',
228         'test/mock_bluetooth_gatt_service.cc',
229         'test/mock_bluetooth_gatt_service.h',
230         'test/mock_bluetooth_socket.cc',
231         'test/mock_bluetooth_socket.h',
232       ],
233     },
234   ],
235   'conditions': [
236     ['OS == "android"', {
237       'targets': [
238         {
239           'target_name': 'device_bluetooth_jni_headers',
240           'type': 'none',
241           'sources': [
242             'android/java/src/org/chromium/device/bluetooth/BluetoothAdapter.java',
243           ],
244           'variables': {
245             'jni_gen_package': 'device_bluetooth',
246           },
247           'includes': [ '../../build/jni_generator.gypi' ],
248         },
249         {
250           'target_name': 'device_bluetooth_java',
251           'type': 'none',
252           'dependencies': [
253             '../../base/base.gyp:base',
254           ],
255           'variables': {
256             'java_in_dir': '../../device/bluetooth/android/java',
257           },
258           'includes': [ '../../build/java.gypi' ],
259         },
260       ],
261     }],
262   ],