Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / device / bluetooth / BUILD.gn
1 # Copyright 2014 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.
4
5 import("//tools/grit/grit_rule.gni")
6
7 config("bluetooth_config") {
8   if (is_win) {
9     ldflags = [
10       # Despite MSDN stating that Bthprops.dll contains the
11       # symbols declared by bthprops.lib, they actually reside here:
12       "/DELAYLOAD:Bthprops.cpl",
13       "/DELAYLOAD:setupapi.dll",
14     ]
15   }
16 }
17
18 static_library("bluetooth") {
19   sources = [
20     "bluetooth_adapter.cc",
21     "bluetooth_adapter.h",
22     "bluetooth_adapter_chromeos.cc",
23     "bluetooth_adapter_chromeos.h",
24     "bluetooth_adapter_factory.cc",
25     "bluetooth_adapter_factory.h",
26     "bluetooth_adapter_mac.h",
27     "bluetooth_adapter_mac.mm",
28     "bluetooth_adapter_win.cc",
29     "bluetooth_adapter_win.h",
30     "bluetooth_channel_mac.mm",
31     "bluetooth_channel_mac.h",
32     "bluetooth_device.cc",
33     "bluetooth_device.h",
34     "bluetooth_device_chromeos.cc",
35     "bluetooth_device_chromeos.h",
36     "bluetooth_device_mac.h",
37     "bluetooth_device_mac.mm",
38     "bluetooth_device_win.cc",
39     "bluetooth_device_win.h",
40     "bluetooth_discovery_manager_mac.mm",
41     "bluetooth_discovery_manager_mac.h",
42     "bluetooth_discovery_session.cc",
43     "bluetooth_discovery_session.h",
44     "bluetooth_gatt_characteristic.cc",
45     "bluetooth_gatt_characteristic.h",
46     "bluetooth_gatt_connection.cc",
47     "bluetooth_gatt_connection.h",
48     "bluetooth_gatt_connection_chromeos.cc",
49     "bluetooth_gatt_connection_chromeos.h",
50     "bluetooth_gatt_descriptor.cc",
51     "bluetooth_gatt_descriptor.h",
52     "bluetooth_gatt_notify_session.cc",
53     "bluetooth_gatt_notify_session.h",
54     "bluetooth_gatt_notify_session_chromeos.cc",
55     "bluetooth_gatt_notify_session_chromeos.h",
56     "bluetooth_gatt_service.cc",
57     "bluetooth_gatt_service.h",
58     "bluetooth_init_win.cc",
59     "bluetooth_init_win.h",
60     "bluetooth_l2cap_channel_mac.mm",
61     "bluetooth_l2cap_channel_mac.h",
62     "bluetooth_low_energy_win.cc",
63     "bluetooth_low_energy_win.h",
64     "bluetooth_pairing_chromeos.cc",
65     "bluetooth_pairing_chromeos.h",
66     "bluetooth_remote_gatt_characteristic_chromeos.cc",
67     "bluetooth_remote_gatt_characteristic_chromeos.h",
68     "bluetooth_remote_gatt_descriptor_chromeos.cc",
69     "bluetooth_remote_gatt_descriptor_chromeos.h",
70     "bluetooth_remote_gatt_service_chromeos.cc",
71     "bluetooth_remote_gatt_service_chromeos.h",
72     "bluetooth_rfcomm_channel_mac.mm",
73     "bluetooth_rfcomm_channel_mac.h",
74     "bluetooth_service_record_win.cc",
75     "bluetooth_service_record_win.h",
76     "bluetooth_socket.cc",
77     "bluetooth_socket.h",
78     "bluetooth_socket_chromeos.cc",
79     "bluetooth_socket_chromeos.h",
80     "bluetooth_socket_mac.h",
81     "bluetooth_socket_mac.mm",
82     "bluetooth_socket_net.cc",
83     "bluetooth_socket_net.h",
84     "bluetooth_socket_thread.cc",
85     "bluetooth_socket_thread.h",
86     "bluetooth_socket_win.cc",
87     "bluetooth_socket_win.h",
88     "bluetooth_task_manager_win.cc",
89     "bluetooth_task_manager_win.h",
90     "bluetooth_uuid.cc",
91     "bluetooth_uuid.h",
92   ]
93
94   all_dependent_configs = [ ":bluetooth_config" ]
95
96   deps = [
97     ":strings",
98     "//base",
99     "//base/third_party/dynamic_annotations",
100     "//net",
101     "//third_party/libxml",
102     "//ui/base",
103     "//ui/gfx",
104     "//ui/gfx/geometry",
105   ]
106
107   if (is_chromeos) {
108     deps += [
109       "//dbus",
110       #'../../chromeos/chromeos.gyp:chromeos',  TODO(GYP)
111     ]
112   }
113
114   if (is_mac) {
115     libs = [ "IOBluetooth.framework" ]
116   }
117 }
118
119 grit("strings") {
120   visibility = ":*"
121   source = "bluetooth_strings.grd"
122   outputs = [
123     "grit/device_bluetooth_strings.h",
124     "device_bluetooth_strings_am.pak",
125     "device_bluetooth_strings_ar.pak",
126     "device_bluetooth_strings_bg.pak",
127     "device_bluetooth_strings_bn.pak",
128     "device_bluetooth_strings_ca.pak",
129     "device_bluetooth_strings_cs.pak",
130     "device_bluetooth_strings_da.pak",
131     "device_bluetooth_strings_de.pak",
132     "device_bluetooth_strings_el.pak",
133     "device_bluetooth_strings_en-GB.pak",
134     "device_bluetooth_strings_en-US.pak",
135     "device_bluetooth_strings_es.pak",
136     "device_bluetooth_strings_es-419.pak",
137     "device_bluetooth_strings_et.pak",
138     "device_bluetooth_strings_fa.pak",
139     "device_bluetooth_strings_fake-bidi.pak",
140     "device_bluetooth_strings_fi.pak",
141     "device_bluetooth_strings_fil.pak",
142     "device_bluetooth_strings_fr.pak",
143     "device_bluetooth_strings_gu.pak",
144     "device_bluetooth_strings_he.pak",
145     "device_bluetooth_strings_hi.pak",
146     "device_bluetooth_strings_hr.pak",
147     "device_bluetooth_strings_hu.pak",
148     "device_bluetooth_strings_id.pak",
149     "device_bluetooth_strings_it.pak",
150     "device_bluetooth_strings_ja.pak",
151     "device_bluetooth_strings_kn.pak",
152     "device_bluetooth_strings_ko.pak",
153     "device_bluetooth_strings_lt.pak",
154     "device_bluetooth_strings_lv.pak",
155     "device_bluetooth_strings_ml.pak",
156     "device_bluetooth_strings_mr.pak",
157     "device_bluetooth_strings_ms.pak",
158     "device_bluetooth_strings_nl.pak",
159     "device_bluetooth_strings_nb.pak",
160     "device_bluetooth_strings_pl.pak",
161     "device_bluetooth_strings_pt-BR.pak",
162     "device_bluetooth_strings_pt-PT.pak",
163     "device_bluetooth_strings_ro.pak",
164     "device_bluetooth_strings_ru.pak",
165     "device_bluetooth_strings_sk.pak",
166     "device_bluetooth_strings_sl.pak",
167     "device_bluetooth_strings_sr.pak",
168     "device_bluetooth_strings_sv.pak",
169     "device_bluetooth_strings_sw.pak",
170     "device_bluetooth_strings_ta.pak",
171     "device_bluetooth_strings_te.pak",
172     "device_bluetooth_strings_th.pak",
173     "device_bluetooth_strings_tr.pak",
174     "device_bluetooth_strings_uk.pak",
175     "device_bluetooth_strings_vi.pak",
176     "device_bluetooth_strings_zh-CN.pak",
177     "device_bluetooth_strings_zh-TW.pak",
178   ]
179 }
180
181 static_library("mocks") {
182   sources = [
183     "test/mock_bluetooth_adapter.cc",
184     "test/mock_bluetooth_adapter.h",
185     "test/mock_bluetooth_device.cc",
186     "test/mock_bluetooth_device.h",
187     "test/mock_bluetooth_discovery_session.cc",
188     "test/mock_bluetooth_discovery_session.h",
189     "test/mock_bluetooth_gatt_characteristic.cc",
190     "test/mock_bluetooth_gatt_characteristic.h",
191     "test/mock_bluetooth_gatt_connection.cc",
192     "test/mock_bluetooth_gatt_connection.h",
193     "test/mock_bluetooth_gatt_descriptor.cc",
194     "test/mock_bluetooth_gatt_descriptor.h",
195     "test/mock_bluetooth_gatt_notify_session.cc",
196     "test/mock_bluetooth_gatt_notify_session.h",
197     "test/mock_bluetooth_gatt_service.cc",
198     "test/mock_bluetooth_gatt_service.h",
199     "test/mock_bluetooth_socket.cc",
200     "test/mock_bluetooth_socket.h",
201   ]
202
203   deps = [
204     ":bluetooth",
205     "//testing/gmock",
206   ]
207 }