blob: 17a52fbaad4655ef5685f7845fa8076cb57339b3 [file] [log] [blame]
kjellanderc76dc952016-06-03 03:09:32 -07001# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
9import("../../build/webrtc.gni")
10
11group("xmpp") {
kjellander705ecc52016-09-15 00:53:26 -070012 public_deps = [
kjellanderc76dc952016-06-03 03:09:32 -070013 ":rtc_xmpp",
14 ]
15}
16
17config("xmpp_warnings_config") {
18 # GN orders flags on a target before flags from configs. The default config
19 # adds these flags so to cancel them out they need to come from a config and
20 # cannot be on the target directly.
21 if (is_android) {
22 cflags = [ "-Wno-error" ]
23 }
24}
25
26config("xmpp_inherited_config") {
27 defines = [
28 "FEATURE_ENABLE_SSL",
29 "FEATURE_ENABLE_VOICEMAIL",
30 ]
31}
32
kjellanderb62dbbe2016-09-23 00:38:52 -070033rtc_static_library("rtc_xmpp") {
kjellanderc76dc952016-06-03 03:09:32 -070034 cflags = []
35 sources = [
36 "asyncsocket.h",
kjellanderc76dc952016-06-03 03:09:32 -070037 "constants.cc",
38 "constants.h",
kjellanderc76dc952016-06-03 03:09:32 -070039 "jid.cc",
40 "jid.h",
kjellanderc76dc952016-06-03 03:09:32 -070041 "plainsaslhandler.h",
kjellanderc76dc952016-06-03 03:09:32 -070042 "prexmppauth.h",
kjellanderc76dc952016-06-03 03:09:32 -070043 "saslcookiemechanism.h",
44 "saslhandler.h",
45 "saslmechanism.cc",
46 "saslmechanism.h",
47 "saslplainmechanism.h",
kjellanderc76dc952016-06-03 03:09:32 -070048 "xmppclient.cc",
49 "xmppclient.h",
50 "xmppclientsettings.h",
51 "xmppengine.h",
52 "xmppengineimpl.cc",
53 "xmppengineimpl.h",
54 "xmppengineimpl_iq.cc",
55 "xmpplogintask.cc",
56 "xmpplogintask.h",
kjellanderc76dc952016-06-03 03:09:32 -070057 "xmppstanzaparser.cc",
58 "xmppstanzaparser.h",
59 "xmpptask.cc",
60 "xmpptask.h",
kjellanderc76dc952016-06-03 03:09:32 -070061 ]
62
63 defines = [ "FEATURE_ENABLE_SSL" ]
64
65 deps = [
66 "../../base:rtc_base",
67 "../xmllite",
68 ]
69
70 if (rtc_build_expat) {
71 deps += [ "//third_party/expat" ]
72 public_deps = [
73 "//third_party/expat",
74 ]
75 }
76
ehmaldonado7a2ce0b2016-09-05 01:35:44 -070077 configs += [ ":xmpp_warnings_config" ]
kjellanderc76dc952016-06-03 03:09:32 -070078
ehmaldonadoe9cc6862016-09-05 06:10:18 -070079 public_configs = [ ":xmpp_inherited_config" ]
kjellanderc76dc952016-06-03 03:09:32 -070080
kjellander5023d412016-06-18 04:23:01 -070081 if (build_with_chromium) {
82 if (is_nacl) {
83 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
84 }
85 } else {
86 sources += [
87 "chatroommodule.h",
88 "chatroommoduleimpl.cc",
89 "discoitemsquerytask.cc",
90 "discoitemsquerytask.h",
91 "hangoutpubsubclient.cc",
92 "hangoutpubsubclient.h",
93 "iqtask.cc",
94 "iqtask.h",
95 "module.h",
96 "moduleimpl.cc",
97 "moduleimpl.h",
98 "mucroomconfigtask.cc",
99 "mucroomconfigtask.h",
100 "mucroomdiscoverytask.cc",
101 "mucroomdiscoverytask.h",
102 "mucroomlookuptask.cc",
103 "mucroomlookuptask.h",
104 "mucroomuniquehangoutidtask.cc",
105 "mucroomuniquehangoutidtask.h",
106 "pingtask.cc",
107 "pingtask.h",
108 "presenceouttask.cc",
109 "presenceouttask.h",
110 "presencereceivetask.cc",
111 "presencereceivetask.h",
112 "presencestatus.cc",
113 "presencestatus.h",
114 "pubsub_task.cc",
115 "pubsub_task.h",
116 "pubsubclient.cc",
117 "pubsubclient.h",
118 "pubsubstateclient.cc",
119 "pubsubstateclient.h",
120 "pubsubtasks.cc",
121 "pubsubtasks.h",
122 "receivetask.cc",
123 "receivetask.h",
124 "rostermodule.h",
125 "rostermoduleimpl.cc",
126 "rostermoduleimpl.h",
127 "xmppauth.cc",
128 "xmppauth.h",
129 "xmpppump.cc",
130 "xmpppump.h",
131 "xmppsocket.cc",
132 "xmppsocket.h",
133 "xmppthread.cc",
134 "xmppthread.h",
135 ]
136
kjellanderc76dc952016-06-03 03:09:32 -0700137 defines += [
138 "FEATURE_ENABLE_VOICEMAIL",
139 "FEATURE_ENABLE_PSTN",
140 ]
141
kjellandere40a7ee2016-10-16 23:56:12 -0700142 if (!build_with_chromium && is_clang) {
143 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700144 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -0700145 }
146 }
147
148 if (is_posix && is_debug) {
149 # The Chromium build/common.gypi defines this for all posix
150 # _except_ for ios & mac. We want it there as well, e.g.
151 # because ASSERT and friends trigger off of it.
152 defines += [ "_DEBUG" ]
153 }
154}