Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | |
|
Sergey Ulanov
2016/12/20 20:36:38
I'm not sure we need to separate directories in th
kjellander_chromium
2016/12/21 14:46:22
Good idea. I've done that in the new patch set.
| |
| 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("../webrtc/build/webrtc.gni") | |
| 6 | |
| 7 group("xmpp") { | |
| 8 public_deps = [ | |
| 9 ":rtc_xmpp", | |
| 10 ] | |
| 11 } | |
| 12 | |
| 13 config("xmpp_warnings_config") { | |
| 14 # GN orders flags on a target before flags from configs. The default config | |
| 15 # adds these flags so to cancel them out they need to come from a config and | |
| 16 # cannot be on the target directly. | |
| 17 if (is_android) { | |
| 18 cflags = [ "-Wno-error" ] | |
| 19 } | |
| 20 } | |
| 21 | |
| 22 config("xmpp_inherited_config") { | |
| 23 defines = [ | |
| 24 "FEATURE_ENABLE_SSL", | |
| 25 "FEATURE_ENABLE_VOICEMAIL", | |
| 26 ] | |
| 27 } | |
| 28 | |
| 29 rtc_static_library("rtc_xmpp") { | |
| 30 cflags = [] | |
| 31 sources = [ | |
| 32 "asyncsocket.h", | |
| 33 "constants.cc", | |
| 34 "constants.h", | |
| 35 "jid.cc", | |
| 36 "jid.h", | |
| 37 "plainsaslhandler.h", | |
| 38 "prexmppauth.h", | |
| 39 "saslcookiemechanism.h", | |
| 40 "saslhandler.h", | |
| 41 "saslmechanism.cc", | |
| 42 "saslmechanism.h", | |
| 43 "saslplainmechanism.h", | |
| 44 "xmppclient.cc", | |
| 45 "xmppclient.h", | |
| 46 "xmppclientsettings.h", | |
| 47 "xmppengine.h", | |
| 48 "xmppengineimpl.cc", | |
| 49 "xmppengineimpl.h", | |
| 50 "xmppengineimpl_iq.cc", | |
| 51 "xmpplogintask.cc", | |
| 52 "xmpplogintask.h", | |
| 53 "xmppstanzaparser.cc", | |
| 54 "xmppstanzaparser.h", | |
| 55 "xmpptask.cc", | |
| 56 "xmpptask.h", | |
| 57 ] | |
| 58 | |
| 59 defines = [ "FEATURE_ENABLE_SSL" ] | |
| 60 | |
| 61 deps = [ | |
| 62 "//third_party/webrtc/base:rtc_base", | |
| 63 "//third_party/xmllite", | |
| 64 ] | |
| 65 | |
| 66 if (rtc_build_expat) { | |
| 67 deps += [ "//third_party/expat" ] | |
| 68 public_deps = [ | |
| 69 "//third_party/expat", | |
| 70 ] | |
| 71 } | |
| 72 | |
| 73 configs += [ ":xmpp_warnings_config" ] | |
| 74 | |
| 75 public_configs = [ ":xmpp_inherited_config" ] | |
| 76 | |
| 77 if (build_with_chromium) { | |
| 78 if (is_nacl) { | |
| 79 deps += [ "//native_client_sdk/src/libraries/nacl_io" ] | |
| 80 } | |
| 81 } else { | |
| 82 sources += [ | |
| 83 "chatroommodule.h", | |
| 84 "chatroommoduleimpl.cc", | |
| 85 "discoitemsquerytask.cc", | |
| 86 "discoitemsquerytask.h", | |
| 87 "hangoutpubsubclient.cc", | |
| 88 "hangoutpubsubclient.h", | |
| 89 "iqtask.cc", | |
| 90 "iqtask.h", | |
| 91 "module.h", | |
| 92 "moduleimpl.cc", | |
| 93 "moduleimpl.h", | |
| 94 "mucroomconfigtask.cc", | |
| 95 "mucroomconfigtask.h", | |
| 96 "mucroomdiscoverytask.cc", | |
| 97 "mucroomdiscoverytask.h", | |
| 98 "mucroomlookuptask.cc", | |
| 99 "mucroomlookuptask.h", | |
| 100 "mucroomuniquehangoutidtask.cc", | |
| 101 "mucroomuniquehangoutidtask.h", | |
| 102 "pingtask.cc", | |
| 103 "pingtask.h", | |
| 104 "presenceouttask.cc", | |
| 105 "presenceouttask.h", | |
| 106 "presencereceivetask.cc", | |
| 107 "presencereceivetask.h", | |
| 108 "presencestatus.cc", | |
| 109 "presencestatus.h", | |
| 110 "pubsub_task.cc", | |
| 111 "pubsub_task.h", | |
| 112 "pubsubclient.cc", | |
| 113 "pubsubclient.h", | |
| 114 "pubsubstateclient.cc", | |
| 115 "pubsubstateclient.h", | |
| 116 "pubsubtasks.cc", | |
| 117 "pubsubtasks.h", | |
| 118 "receivetask.cc", | |
| 119 "receivetask.h", | |
| 120 "rostermodule.h", | |
| 121 "rostermoduleimpl.cc", | |
| 122 "rostermoduleimpl.h", | |
| 123 "xmppauth.cc", | |
| 124 "xmppauth.h", | |
| 125 "xmpppump.cc", | |
| 126 "xmpppump.h", | |
| 127 "xmppsocket.cc", | |
| 128 "xmppsocket.h", | |
| 129 "xmppthread.cc", | |
| 130 "xmppthread.h", | |
| 131 ] | |
| 132 | |
| 133 defines += [ | |
| 134 "FEATURE_ENABLE_VOICEMAIL", | |
| 135 "FEATURE_ENABLE_PSTN", | |
| 136 ] | |
| 137 | |
| 138 if (!build_with_chromium && is_clang) { | |
| 139 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
| 140 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
| 141 } | |
| 142 } | |
| 143 | |
| 144 if (is_posix && is_debug) { | |
| 145 # The Chromium build/common.gypi defines this for all posix | |
| 146 # _except_ for ios & mac. We want it there as well, e.g. | |
| 147 # because ASSERT and friends trigger off of it. | |
| 148 defines += [ "_DEBUG" ] | |
| 149 } | |
| 150 } | |
| 151 | |
| 152 if (rtc_include_tests) { | |
| 153 config("xmpp_unittests_config") { | |
| 154 # GN orders flags on a target before flags from configs. The default config | |
| 155 # adds -Wall, and this flag have to be after -Wall -- so they need to | |
| 156 # come from a config and can"t be on the target directly. | |
| 157 if (is_clang) { | |
| 158 cflags = [ | |
| 159 "-Wno-missing-braces", | |
| 160 "-Wno-sign-compare", | |
| 161 "-Wno-unused-const-variable", | |
| 162 ] | |
| 163 } | |
| 164 } | |
| 165 | |
| 166 rtc_test("xmpp_unittests") { | |
| 167 configs += [ ":xmpp_unittests_config" ] | |
| 168 | |
| 169 if (!build_with_chromium && is_clang) { | |
| 170 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
| 171 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
| 172 } | |
| 173 | |
| 174 deps = [ | |
| 175 ":rtc_xmpp", | |
| 176 "//testing/gtest", | |
| 177 "//third_party/webrtc/base:rtc_base_tests_utils", | |
| 178 ] | |
| 179 | |
| 180 sources = [ | |
| 181 "fakexmppclient.h", | |
| 182 "hangoutpubsubclient_unittest.cc", | |
| 183 "jid_unittest.cc", | |
| 184 "mucroomconfigtask_unittest.cc", | |
| 185 "mucroomdiscoverytask_unittest.cc", | |
| 186 "mucroomlookuptask_unittest.cc", | |
| 187 "mucroomuniquehangoutidtask_unittest.cc", | |
| 188 "pingtask_unittest.cc", | |
| 189 "pubsubclient_unittest.cc", | |
| 190 "pubsubtasks_unittest.cc", | |
| 191 "util_unittest.cc", | |
| 192 "util_unittest.h", | |
| 193 "xmppengine_unittest.cc", | |
| 194 "xmpplogintask_unittest.cc", | |
| 195 "xmppstanzaparser_unittest.cc", | |
| 196 ] | |
| 197 } | |
| 198 } | |
| OLD | NEW |