Use chromeos accelerometer reader in athena and support only lid accelerometer.
[chromium-blink-merge.git] / jingle / BUILD.gn
blob7fd8f128d811fb710e582874b8b1fab17fbba815
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.
5 import("//build/config/features.gni")
7 if (enable_webrtc || !is_android) {
8   jingle_includes = exec_script("//build/gypi_to_gn.py",
9                                 [ rebase_path("jingle.gypi") ],
10                                 "scope",
11                                 [ "jingle.gypi" ])
13   # GYP version: jingle/jingle.gyp:jingle_glue
14   static_library("jingle_glue") {
15     sources = jingle_includes.jingle_glue_sources
16     deps = [
17       "//base",
18       "//base/third_party/dynamic_annotations",
19       "//net",
20       "//third_party/libjingle",
21     ]
22     forward_dependent_configs_from = [ "//third_party/libjingle" ]
23   }
25   # A library for sending and receiving peer-issued notifications.
26   # GYP version: jingle/jingle.gyp:notifier
27   static_library("notifier") {
28     sources = [
29       "notifier/base/const_communicator.h",
30       "notifier/base/gaia_constants.cc",
31       "notifier/base/gaia_constants.h",
32       "notifier/base/gaia_token_pre_xmpp_auth.cc",
33       "notifier/base/gaia_token_pre_xmpp_auth.h",
34       "notifier/base/notification_method.h",
35       "notifier/base/notification_method.cc",
36       "notifier/base/notifier_options.cc",
37       "notifier/base/notifier_options.h",
38       "notifier/base/notifier_options_util.cc",
39       "notifier/base/notifier_options_util.h",
40       "notifier/base/server_information.cc",
41       "notifier/base/server_information.h",
42       "notifier/base/weak_xmpp_client.cc",
43       "notifier/base/weak_xmpp_client.h",
44       "notifier/base/xmpp_connection.cc",
45       "notifier/base/xmpp_connection.h",
46       "notifier/communicator/connection_settings.cc",
47       "notifier/communicator/connection_settings.h",
48       "notifier/communicator/login.cc",
49       "notifier/communicator/login.h",
50       "notifier/communicator/login_settings.cc",
51       "notifier/communicator/login_settings.h",
52       "notifier/communicator/single_login_attempt.cc",
53       "notifier/communicator/single_login_attempt.h",
54       "notifier/listener/non_blocking_push_client.cc",
55       "notifier/listener/non_blocking_push_client.h",
56       "notifier/listener/notification_constants.cc",
57       "notifier/listener/notification_constants.h",
58       "notifier/listener/notification_defines.cc",
59       "notifier/listener/notification_defines.h",
60       "notifier/listener/push_client_observer.cc",
61       "notifier/listener/push_client_observer.h",
62       "notifier/listener/push_client.cc",
63       "notifier/listener/push_client.h",
64       "notifier/listener/push_notifications_listen_task.cc",
65       "notifier/listener/push_notifications_listen_task.h",
66       "notifier/listener/push_notifications_send_update_task.cc",
67       "notifier/listener/push_notifications_send_update_task.h",
68       "notifier/listener/push_notifications_subscribe_task.cc",
69       "notifier/listener/push_notifications_subscribe_task.h",
70       "notifier/listener/send_ping_task.cc",
71       "notifier/listener/send_ping_task.h",
72       "notifier/listener/xml_element_util.cc",
73       "notifier/listener/xml_element_util.h",
74       "notifier/listener/xmpp_push_client.cc",
75       "notifier/listener/xmpp_push_client.h",
76     ]
77     defines = [
78      "_CRT_SECURE_NO_WARNINGS",
79     ]
80     deps = [
81       "//base",
82       "//net",
83       "//third_party/expat",
84       "//url",
85       ":jingle_glue",
86       "//third_party/libjingle",
87     ]
88     forward_dependent_configs_from = [ "//third_party/libjingle" ]
89   }
91   # GYP version: jingle/jingle.gyp:notifier_test_util
92   static_library("notifier_test_util") {
93     testonly = true
94     sources = [
95       "notifier/base/fake_base_task.cc",
96       "notifier/base/fake_base_task.h",
97       "notifier/listener/fake_push_client.cc",
98       "notifier/listener/fake_push_client.h",
99       "notifier/listener/fake_push_client_observer.cc",
100       "notifier/listener/fake_push_client_observer.h",
101     ]
102     deps = [
103       ":notifier",
104       "//base",
105       "//testing/gmock",
106     ]
107   }
109   # GYP version: jingle/jingle.gyp:jingle_unittests
110   # TODO(GYP): Convert to executable when its dependencies are linkable.
111   source_set("jingle_unittests") {
112     testonly = true
113     sources = [
114       "glue/channel_socket_adapter_unittest.cc",
115       "glue/chrome_async_socket_unittest.cc",
116       "glue/fake_ssl_client_socket_unittest.cc",
117       "glue/jingle_glue_mock_objects.cc",
118       "glue/jingle_glue_mock_objects.h",
119       "glue/logging_unittest.cc",
120       "glue/mock_task.cc",
121       "glue/mock_task.h",
122       "glue/proxy_resolving_client_socket_unittest.cc",
123       "glue/pseudotcp_adapter_unittest.cc",
124       "glue/task_pump_unittest.cc",
125       "glue/thread_wrapper_unittest.cc",
126       "notifier/base/weak_xmpp_client_unittest.cc",
127       "notifier/base/xmpp_connection_unittest.cc",
128       "notifier/communicator/connection_settings_unittest.cc",
129       "notifier/communicator/login_settings_unittest.cc",
130       "notifier/communicator/single_login_attempt_unittest.cc",
131       "notifier/listener/non_blocking_push_client_unittest.cc",
132       "notifier/listener/notification_defines_unittest.cc",
133       "notifier/listener/push_client_unittest.cc",
134       "notifier/listener/push_notifications_send_update_task_unittest.cc",
135       "notifier/listener/push_notifications_subscribe_task_unittest.cc",
136       "notifier/listener/send_ping_task_unittest.cc",
137       "notifier/listener/xml_element_util_unittest.cc",
138       "notifier/listener/xmpp_push_client_unittest.cc",
139     ]
141     if (is_android) {
142       sources -= [
143         # TODO(jrg):
144         # EXPECT_DEBUG_DEATH() uses features not enabled.
145         # Should we -std=c++0x or -std=gnu++0x?
146         "glue/chrome_async_socket_unittest.cc",
147         "notifier/base/xmpp_connection_unittest.cc",
148       ]
149     }
151     deps = [
152       ":jingle_glue",
153       ":notifier",
154       ":notifier_test_util",
155       "//base",
156       "//base/test:run_all_unittests",
157       "//base/test:test_support",
158       "//net",
159       "//net:test_support",
160       "//testing/gmock",
161       "//testing/gtest",
162       "//third_party/libjingle",
163     ]
164     forward_dependent_configs_from = [ "//third_party/libjingle" ]
165   }
166 } else {
167   # !enable_webrtc and is_android
168   # Stub targets as Android doesn't use libjingle when webrtc is disabled.
169   source_set("jingle_glue") { }
171   source_set("jingle_glue_test_util") { }
173   # GYP version: jingle/jingle.gyp:notifier
174   static_library("notifier") {
175     sources = [
176       "notifier/base/gaia_constants.cc",
177       "notifier/base/gaia_constants.h",
178       "notifier/base/notification_method.h",
179       "notifier/base/notification_method.cc",
180       "notifier/base/notifier_options.cc",
181       "notifier/base/notifier_options.h",
182     ]
183     deps = [
184       "//base",
185       "//net"
186     ]
187   }
189   source_set("notifier_test_util") { }