aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/CMakeLists.txt
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-11-29 16:03:18 +0100
committerfiaxh <git@lightrise.org>2019-11-29 16:03:18 +0100
commitd194eae61d4fda8504a037daa721d9810ed1fe3e (patch)
tree0bca1c934573e7ee1d2528a8355f9297f7cb1f56 /xmpp-vala/CMakeLists.txt
parent1985fe1d7b94bd1eff80bb3da14bbc52e5585163 (diff)
downloaddino-d194eae61d4fda8504a037daa721d9810ed1fe3e.tar.gz
dino-d194eae61d4fda8504a037daa721d9810ed1fe3e.zip
Set ALPN info on XMPP connections if GIO >= 2.60
Diffstat (limited to 'xmpp-vala/CMakeLists.txt')
-rw-r--r--xmpp-vala/CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/xmpp-vala/CMakeLists.txt b/xmpp-vala/CMakeLists.txt
index 5836f96f..57347282 100644
--- a/xmpp-vala/CMakeLists.txt
+++ b/xmpp-vala/CMakeLists.txt
@@ -6,6 +6,16 @@ find_packages(ENGINE_PACKAGES REQUIRED
GObject
)
+set(ENGINE_DEFINITIONS "")
+
+find_package(GIO)
+if(GIO_VERSION VERSION_GREATER "2.60")
+ message(STATUS "ALPN support enabled")
+ set(ENGINE_DEFINITIONS ALPN_SUPPORT)
+else()
+ message(STATUS "No ALPN support, needs GIO >= 2.60")
+endif()
+
vala_precompile(ENGINE_VALA_C
SOURCES
"src/glib_fixes.vapi"
@@ -91,6 +101,8 @@ GENERATE_VAPI
xmpp-vala
GENERATE_HEADER
xmpp-vala
+DEFINITIONS
+ ${ENGINE_DEFINITIONS}
)
add_custom_target(xmpp-vala-vapi