| Index: third_party/libjingle_xmpp/BUILD.gn
|
| diff --git a/third_party/libjingle_xmpp/BUILD.gn b/third_party/libjingle_xmpp/BUILD.gn
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6b01b4fa0c45ec33f886b6e243b057dd6f23a94b
|
| --- /dev/null
|
| +++ b/third_party/libjingle_xmpp/BUILD.gn
|
| @@ -0,0 +1,153 @@
|
| +# Copyright 2016 The Chromium Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
| +
|
| +# TODO(kjellander): Remove remaining dependencies on the WebRTC codebase.
|
| +import("../webrtc/build/webrtc.gni")
|
| +
|
| +group("libjingle_xmpp") {
|
| + public_deps = [
|
| + ":rtc_xmllite",
|
| + ":rtc_xmpp",
|
| + ]
|
| +}
|
| +
|
| +rtc_static_library("rtc_xmllite") {
|
| + sources = [
|
| + "xmllite/qname.cc",
|
| + "xmllite/qname.h",
|
| + "xmllite/xmlbuilder.cc",
|
| + "xmllite/xmlbuilder.h",
|
| + "xmllite/xmlconstants.cc",
|
| + "xmllite/xmlconstants.h",
|
| + "xmllite/xmlelement.cc",
|
| + "xmllite/xmlelement.h",
|
| + "xmllite/xmlnsstack.cc",
|
| + "xmllite/xmlnsstack.h",
|
| + "xmllite/xmlparser.cc",
|
| + "xmllite/xmlparser.h",
|
| + "xmllite/xmlprinter.cc",
|
| + "xmllite/xmlprinter.h",
|
| + ]
|
| +
|
| + deps = [
|
| + "//third_party/webrtc/base:rtc_base",
|
| + ]
|
| + public_deps = [
|
| + "//third_party/expat",
|
| + ]
|
| +}
|
| +
|
| +config("rtc_xmpp_warnings_config") {
|
| + # GN orders flags on a target before flags from configs. The default config
|
| + # adds these flags so to cancel them out they need to come from a config and
|
| + # cannot be on the target directly.
|
| + if (is_android) {
|
| + cflags = [ "-Wno-error" ]
|
| + }
|
| +}
|
| +
|
| +config("rtc_xmpp_inherited_config") {
|
| + defines = [
|
| + "FEATURE_ENABLE_SSL",
|
| + "FEATURE_ENABLE_VOICEMAIL",
|
| + ]
|
| +}
|
| +
|
| +rtc_static_library("rtc_xmpp") {
|
| + cflags = []
|
| + sources = [
|
| + "xmpp/asyncsocket.h",
|
| + "xmpp/constants.cc",
|
| + "xmpp/constants.h",
|
| + "xmpp/jid.cc",
|
| + "xmpp/jid.h",
|
| + "xmpp/plainsaslhandler.h",
|
| + "xmpp/prexmppauth.h",
|
| + "xmpp/saslcookiemechanism.h",
|
| + "xmpp/saslhandler.h",
|
| + "xmpp/saslmechanism.cc",
|
| + "xmpp/saslmechanism.h",
|
| + "xmpp/saslplainmechanism.h",
|
| + "xmpp/xmppclient.cc",
|
| + "xmpp/xmppclient.h",
|
| + "xmpp/xmppclientsettings.h",
|
| + "xmpp/xmppengine.h",
|
| + "xmpp/xmppengineimpl.cc",
|
| + "xmpp/xmppengineimpl.h",
|
| + "xmpp/xmppengineimpl_iq.cc",
|
| + "xmpp/xmpplogintask.cc",
|
| + "xmpp/xmpplogintask.h",
|
| + "xmpp/xmppstanzaparser.cc",
|
| + "xmpp/xmppstanzaparser.h",
|
| + "xmpp/xmpptask.cc",
|
| + "xmpp/xmpptask.h",
|
| + ]
|
| +
|
| + defines = [ "FEATURE_ENABLE_SSL" ]
|
| +
|
| + deps = [
|
| + ":rtc_xmllite",
|
| + "//third_party/webrtc/base:rtc_base",
|
| + ]
|
| + public_deps = [
|
| + "//third_party/expat",
|
| + ]
|
| + configs += [ ":rtc_xmpp_warnings_config" ]
|
| +
|
| + public_configs = [ ":rtc_xmpp_inherited_config" ]
|
| +
|
| + if (is_nacl) {
|
| + deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
|
| + }
|
| +
|
| + if (is_posix && is_debug) {
|
| + # The Chromium configs defines this for all posix _except_ for ios & mac.
|
| + # We want it there as well, e.g. because ASSERT and friends trigger off of
|
| + # it.
|
| + defines += [ "_DEBUG" ]
|
| + }
|
| +}
|
| +
|
| +config("libjingle_xmpp_unittests_config") {
|
| + # GN orders flags on a target before flags from configs. The default config
|
| + # adds -Wall, and this flag have to be after -Wall -- so they need to
|
| + # come from a config and can"t be on the target directly.
|
| + if (is_clang) {
|
| + cflags = [
|
| + "-Wno-missing-braces",
|
| + "-Wno-sign-compare",
|
| + "-Wno-unused-const-variable",
|
| + ]
|
| + }
|
| +}
|
| +
|
| +rtc_test("libjingle_xmpp_unittests") {
|
| + configs += [ ":libjingle_xmpp_unittests_config" ]
|
| +
|
| + deps = [
|
| + ":libjingle_xmpp",
|
| +
|
| + # TODO(kjellander): Refactor/remove this dependency. It is needed by
|
| + # third_party/webrtc_overrides/webrtc/base/win32socketinit.cc.
|
| + "//net",
|
| + "//testing/gtest",
|
| + ]
|
| +
|
| + sources = [
|
| + "run_all_unittests.cc",
|
| + "xmllite/qname_unittest.cc",
|
| + "xmllite/xmlbuilder_unittest.cc",
|
| + "xmllite/xmlelement_unittest.cc",
|
| + "xmllite/xmlnsstack_unittest.cc",
|
| + "xmllite/xmlparser_unittest.cc",
|
| + "xmllite/xmlprinter_unittest.cc",
|
| + "xmpp/fakexmppclient.h",
|
| + "xmpp/jid_unittest.cc",
|
| + "xmpp/util_unittest.cc",
|
| + "xmpp/util_unittest.h",
|
| + "xmpp/xmppengine_unittest.cc",
|
| + "xmpp/xmpplogintask_unittest.cc",
|
| + "xmpp/xmppstanzaparser_unittest.cc",
|
| + ]
|
| +}
|
|
|