aboutsummaryrefslogtreecommitdiff
path: root/cmake/modules/FindSpeex.cmake
diff options
context:
space:
mode:
authorNiels Ole Salscheider <niels_ole@salscheider-online.de>2018-06-23 17:20:47 +0200
committerGitHub <noreply@github.com>2018-06-23 17:20:47 +0200
commited6b199dff15ddb4c6bd72d1565501e9f1a2bf87 (patch)
tree7bbb53c40ecf53fe9464b53b7966dd7726eeac5e /cmake/modules/FindSpeex.cmake
parentea83c77a5a4524cc9778336b10eff60979582980 (diff)
parent31f0a42073b68823e85835ec3e25114d79705a04 (diff)
downloadqxmpp-ed6b199dff15ddb4c6bd72d1565501e9f1a2bf87.tar.gz
Merge pull request #131 from olesalscheider/cmake
Add CMake build system, drop Qt4 support
Diffstat (limited to 'cmake/modules/FindSpeex.cmake')
-rw-r--r--cmake/modules/FindSpeex.cmake25
1 files changed, 25 insertions, 0 deletions
diff --git a/cmake/modules/FindSpeex.cmake b/cmake/modules/FindSpeex.cmake
new file mode 100644
index 00000000..3929b2ec
--- /dev/null
+++ b/cmake/modules/FindSpeex.cmake
@@ -0,0 +1,25 @@
+# Try to find Speex
+# Once done this will define
+# Speex_FOUND - System has Speex
+# Speex_INCLUDE_DIRS - The Speex include directories
+# Speex_LIBRARIES - The libraries needed to use Speex
+
+find_package(PkgConfig)
+pkg_check_modules(PC_Speex QUIET libspeex)
+
+find_path(Speex_INCLUDE_DIR speex/speex.h
+ HINTS ${PC_Speex_INCLUDEDIR} ${PC_Speex_INCLUDE_DIRS}
+)
+
+find_library(Speex_LIBRARY NAMES speex
+ HINTS ${PC_Speex_LIBDIR} ${PC_Speex_LIBRARY_DIRS}
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Speex DEFAULT_MSG Speex_LIBRARY Speex_INCLUDE_DIR)
+
+mark_as_advanced(Speex_INCLUDE_DIR Speex_LIBRARY)
+
+set(Speex_LIBRARIES ${Speex_LIBRARY})
+set(Speex_INCLUDE_DIRS ${Speex_INCLUDE_DIR})
+