aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorhrxi <hrrrxi@gmail.com>2019-12-28 03:11:51 +0100
committerfiaxh <git@lightrise.org>2021-03-19 22:06:02 +0100
commit148cf48d2b68354881066e2587e2673c91d2619a (patch)
tree623c2eda8dda8d327084b36bc74120933be061bf /cmake
parente70b7c1222506a881b4166c67803c467e1985bbc (diff)
downloaddino-148cf48d2b68354881066e2587e2673c91d2619a.tar.gz
dino-148cf48d2b68354881066e2587e2673c91d2619a.zip
Add libnice and listen for direct connections in Jingle SOCKS5 (#608)
Add libnice as a plugin. If it is present, use libnice to enumerate local IP addresses and listen on them to support direct connections for Jingle SOCKS5. Tested with Conversations and Gajim. Created the nice.vapi file using ``` vapigen --library nice --pkg gio-2.0 --metadatadir metadata /usr/share/gir-1.0/Nice-0.1.gir ```
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindNice.cmake13
-rw-r--r--cmake/PkgConfigWithFallback.cmake2
2 files changed, 14 insertions, 1 deletions
diff --git a/cmake/FindNice.cmake b/cmake/FindNice.cmake
new file mode 100644
index 00000000..d40fc8c7
--- /dev/null
+++ b/cmake/FindNice.cmake
@@ -0,0 +1,13 @@
+include(PkgConfigWithFallback)
+find_pkg_config_with_fallback(Nice
+ PKG_CONFIG_NAME nice
+ LIB_NAMES nice
+ INCLUDE_NAMES nice.h
+ INCLUDE_DIR_SUFFIXES nice nice/include
+ DEPENDS GIO
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Nice
+ REQUIRED_VARS Nice_LIBRARY
+ VERSION_VAR Nice_VERSION)
diff --git a/cmake/PkgConfigWithFallback.cmake b/cmake/PkgConfigWithFallback.cmake
index ea14fa23..9124bb35 100644
--- a/cmake/PkgConfigWithFallback.cmake
+++ b/cmake/PkgConfigWithFallback.cmake
@@ -10,7 +10,7 @@ function(find_pkg_config_with_fallback name)
endif(PKG_CONFIG_FOUND)
if (${name}_PKG_CONFIG_FOUND)
- # Found via pkg-config, using it's result values
+ # Found via pkg-config, using its result values
set(${name}_FOUND ${${name}_PKG_CONFIG_FOUND})
# Try to find real file name of libraries