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