Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Unified Diff: third_party/libjingle_xmpp/xmpp/BUILD.gn

Issue 2443903004: Add xmllite and xmpp sources to third_party/ (Closed)
Patch Set: Fix GN and sort includes Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/libjingle_xmpp/xmpp/BUILD.gn
diff --git a/third_party/libjingle_xmpp/xmpp/BUILD.gn b/third_party/libjingle_xmpp/xmpp/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..4bf6fff1c0e5ff1498e247b64088633ae209625b
--- /dev/null
+++ b/third_party/libjingle_xmpp/xmpp/BUILD.gn
@@ -0,0 +1,198 @@
+# 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.
+
+import("../../webrtc/build/webrtc.gni")
+
+group("xmpp") {
+ public_deps = [
+ ":rtc_xmpp",
+ ]
+}
+
+config("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("xmpp_inherited_config") {
+ defines = [
+ "FEATURE_ENABLE_SSL",
+ "FEATURE_ENABLE_VOICEMAIL",
+ ]
+}
+
+rtc_static_library("rtc_xmpp") {
+ cflags = []
+ sources = [
+ "asyncsocket.h",
+ "constants.cc",
+ "constants.h",
+ "jid.cc",
+ "jid.h",
+ "plainsaslhandler.h",
+ "prexmppauth.h",
+ "saslcookiemechanism.h",
+ "saslhandler.h",
+ "saslmechanism.cc",
+ "saslmechanism.h",
+ "saslplainmechanism.h",
+ "xmppclient.cc",
+ "xmppclient.h",
+ "xmppclientsettings.h",
+ "xmppengine.h",
+ "xmppengineimpl.cc",
+ "xmppengineimpl.h",
+ "xmppengineimpl_iq.cc",
+ "xmpplogintask.cc",
+ "xmpplogintask.h",
+ "xmppstanzaparser.cc",
+ "xmppstanzaparser.h",
+ "xmpptask.cc",
+ "xmpptask.h",
+ ]
+
+ defines = [ "FEATURE_ENABLE_SSL" ]
+
+ deps = [
+ "//third_party/libjingle_xmpp/xmllite",
+ "//third_party/webrtc/base:rtc_base",
+ ]
+
+ if (rtc_build_expat) {
+ deps += [ "//third_party/expat" ]
+ public_deps = [
+ "//third_party/expat",
+ ]
+ }
+
+ configs += [ ":xmpp_warnings_config" ]
+
+ public_configs = [ ":xmpp_inherited_config" ]
+
+ if (build_with_chromium) {
+ if (is_nacl) {
+ deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
+ }
+ } else {
+ sources += [
+ "chatroommodule.h",
+ "chatroommoduleimpl.cc",
+ "discoitemsquerytask.cc",
+ "discoitemsquerytask.h",
+ "hangoutpubsubclient.cc",
+ "hangoutpubsubclient.h",
+ "iqtask.cc",
+ "iqtask.h",
+ "module.h",
+ "moduleimpl.cc",
+ "moduleimpl.h",
+ "mucroomconfigtask.cc",
+ "mucroomconfigtask.h",
+ "mucroomdiscoverytask.cc",
+ "mucroomdiscoverytask.h",
+ "mucroomlookuptask.cc",
+ "mucroomlookuptask.h",
+ "mucroomuniquehangoutidtask.cc",
+ "mucroomuniquehangoutidtask.h",
+ "pingtask.cc",
+ "pingtask.h",
+ "presenceouttask.cc",
+ "presenceouttask.h",
+ "presencereceivetask.cc",
+ "presencereceivetask.h",
+ "presencestatus.cc",
+ "presencestatus.h",
+ "pubsub_task.cc",
+ "pubsub_task.h",
+ "pubsubclient.cc",
+ "pubsubclient.h",
+ "pubsubstateclient.cc",
+ "pubsubstateclient.h",
+ "pubsubtasks.cc",
+ "pubsubtasks.h",
+ "receivetask.cc",
+ "receivetask.h",
+ "rostermodule.h",
+ "rostermoduleimpl.cc",
+ "rostermoduleimpl.h",
+ "xmppauth.cc",
+ "xmppauth.h",
+ "xmpppump.cc",
+ "xmpppump.h",
+ "xmppsocket.cc",
+ "xmppsocket.h",
+ "xmppthread.cc",
+ "xmppthread.h",
+ ]
+
+ defines += [
+ "FEATURE_ENABLE_VOICEMAIL",
+ "FEATURE_ENABLE_PSTN",
+ ]
+
+ if (!build_with_chromium && is_clang) {
+ # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
+ suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
+ }
+ }
+
+ if (is_posix && is_debug) {
+ # The Chromium build/common.gypi 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" ]
+ }
+}
+
+if (rtc_include_tests) {
+ config("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("xmpp_unittests") {
+ configs += [ ":xmpp_unittests_config" ]
+
+ if (!build_with_chromium && is_clang) {
+ # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
+ suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ deps = [
+ ":rtc_xmpp",
+ "//testing/gtest",
+ "//third_party/webrtc/base:rtc_base_tests_utils",
+ ]
+
+ sources = [
+ "fakexmppclient.h",
+ "hangoutpubsubclient_unittest.cc",
+ "jid_unittest.cc",
+ "mucroomconfigtask_unittest.cc",
+ "mucroomdiscoverytask_unittest.cc",
+ "mucroomlookuptask_unittest.cc",
+ "mucroomuniquehangoutidtask_unittest.cc",
+ "pingtask_unittest.cc",
+ "pubsubclient_unittest.cc",
+ "pubsubtasks_unittest.cc",
+ "util_unittest.cc",
+ "util_unittest.h",
+ "xmppengine_unittest.cc",
+ "xmpplogintask_unittest.cc",
+ "xmppstanzaparser_unittest.cc",
+ ]
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698