kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 1 | # 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 | |
| 9 | import("../../build/webrtc.gni") |
| 10 | |
| 11 | group("xmpp") { |
kjellander | 705ecc5 | 2016-09-15 00:53:26 -0700 | [diff] [blame] | 12 | public_deps = [ |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 13 | ":rtc_xmpp", |
| 14 | ] |
| 15 | } |
| 16 | |
| 17 | config("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 | |
| 26 | config("xmpp_inherited_config") { |
| 27 | defines = [ |
| 28 | "FEATURE_ENABLE_SSL", |
| 29 | "FEATURE_ENABLE_VOICEMAIL", |
| 30 | ] |
| 31 | } |
| 32 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 33 | rtc_static_library("rtc_xmpp") { |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 34 | cflags = [] |
| 35 | sources = [ |
| 36 | "asyncsocket.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 37 | "constants.cc", |
| 38 | "constants.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 39 | "jid.cc", |
| 40 | "jid.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 41 | "plainsaslhandler.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 42 | "prexmppauth.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 43 | "saslcookiemechanism.h", |
| 44 | "saslhandler.h", |
| 45 | "saslmechanism.cc", |
| 46 | "saslmechanism.h", |
| 47 | "saslplainmechanism.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 48 | "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", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 57 | "xmppstanzaparser.cc", |
| 58 | "xmppstanzaparser.h", |
| 59 | "xmpptask.cc", |
| 60 | "xmpptask.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 61 | ] |
| 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 | |
ehmaldonado | 7a2ce0b | 2016-09-05 01:35:44 -0700 | [diff] [blame] | 77 | configs += [ ":xmpp_warnings_config" ] |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 78 | |
ehmaldonado | e9cc686 | 2016-09-05 06:10:18 -0700 | [diff] [blame] | 79 | public_configs = [ ":xmpp_inherited_config" ] |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 80 | |
kjellander | 5023d41 | 2016-06-18 04:23:01 -0700 | [diff] [blame] | 81 | 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 | |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 137 | defines += [ |
| 138 | "FEATURE_ENABLE_VOICEMAIL", |
| 139 | "FEATURE_ENABLE_PSTN", |
| 140 | ] |
| 141 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 142 | if (!build_with_chromium && is_clang) { |
| 143 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 144 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 145 | } |
| 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 | } |