Supervised user import: Listen for profile creation/deletion
[chromium-blink-merge.git] / device / bluetooth / bluetooth.gyp
blobb89e91a8ff4b0ef962f617c3b54b8f21714300cd
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=="win"', {
129           # The following two blocks are duplicated. They apply to static lib
130           # and shared lib configurations respectively.
131           'all_dependent_settings': {  # For static lib, apply to dependents.
132             'msvs_settings': {
133               'VCLinkerTool': {
134                 'DelayLoadDLLs': [
135                   'BluetoothApis.dll',
136                   # Despite MSDN stating that Bthprops.dll contains the
137                   # symbols declared by bthprops.lib, they actually reside here:
138                   'Bthprops.cpl',
139                   'setupapi.dll',
140                 ],
141               },
142             },
143           },
144           'msvs_settings': {  # For shared lib, apply to self.
145             'VCLinkerTool': {
146               'DelayLoadDLLs': [
147                 'BluetoothApis.dll',
148                 # Despite MSDN stating that Bthprops.dll contains the
149                 # symbols declared by bthprops.lib, they actually reside here:
150                 'Bthprops.cpl',
151                 'setupapi.dll',
152               ],
153             },
154           },
155         }],
156         ['OS=="mac"', {
157           'link_settings': {
158             'libraries': [
159               '$(SDKROOT)/System/Library/Frameworks/IOBluetooth.framework',
160             ],
161             'conditions': [
162               ['mac_sdk == "10.10"', {
163                 'xcode_settings': {
164                   # In the OSX 10.10 SDK, CoreBluetooth became a top level
165                   # framework. Previously, it was nested in IOBluetooth. In
166                   # order for Chrome to run on OSes older than OSX 10.10, the
167                   # top level CoreBluetooth framework must be weakly linked.
168                   'OTHER_LDFLAGS': [
169                     '-weak_framework CoreBluetooth',
170                   ],
171                 },
172               }],
173             ],
174           },
175         }],
176       ],
177     },
178     {
179       # GN version: //device/bluetooth/uribeacon
180       'target_name': 'uribeacon',
181       'type': 'static_library',
182       'dependencies': [
183         '../../base/base.gyp:base',
184       ],
185       'sources': [
186         'uribeacon/uri_encoder.cc',
187         'uribeacon/uri_encoder.h'
188       ]
189     },
190     {
191       # GN version: //device/bluetooth:mocks
192       'target_name': 'device_bluetooth_mocks',
193       'type': 'static_library',
194       'dependencies': [
195         '../../testing/gmock.gyp:gmock',
196         'device_bluetooth',
197       ],
198       'include_dirs': [
199         '../../',
200       ],
201       'sources': [
202         # Note: file list duplicated in GN build.
203         'test/mock_bluetooth_adapter.cc',
204         'test/mock_bluetooth_adapter.h',
205         'test/mock_bluetooth_device.cc',
206         'test/mock_bluetooth_device.h',
207         'test/mock_bluetooth_discovery_session.cc',
208         'test/mock_bluetooth_discovery_session.h',
209         'test/mock_bluetooth_gatt_characteristic.cc',
210         'test/mock_bluetooth_gatt_characteristic.h',
211         'test/mock_bluetooth_gatt_connection.cc',
212         'test/mock_bluetooth_gatt_connection.h',
213         'test/mock_bluetooth_gatt_descriptor.cc',
214         'test/mock_bluetooth_gatt_descriptor.h',
215         'test/mock_bluetooth_gatt_notify_session.cc',
216         'test/mock_bluetooth_gatt_notify_session.h',
217         'test/mock_bluetooth_gatt_service.cc',
218         'test/mock_bluetooth_gatt_service.h',
219         'test/mock_bluetooth_socket.cc',
220         'test/mock_bluetooth_socket.h',
221       ],
222     },
223   ],