aboutsummaryrefslogtreecommitdiff
path: root/cmake/modules/FindVPX.cmake
diff options
context:
space:
mode:
authorNiels Ole Salscheider <niels_ole@salscheider-online.de>2017-09-03 22:27:25 +0200
committerNiels Ole Salscheider <niels_ole@salscheider-online.de>2017-09-04 20:34:53 +0200
commit77d52eb507474ae5a2c1b2f540e3c67945eaea37 (patch)
tree7f0a9e19bd8cdff3f5ecb72ce04708c42e9558c7 /cmake/modules/FindVPX.cmake
parent8e0415d0bacbce3fc6d7b66304936d578d52b214 (diff)
downloadqxmpp-77d52eb507474ae5a2c1b2f540e3c67945eaea37.tar.gz
Re-add codecs support to the build system
Diffstat (limited to 'cmake/modules/FindVPX.cmake')
-rw-r--r--cmake/modules/FindVPX.cmake25
1 files changed, 25 insertions, 0 deletions
diff --git a/cmake/modules/FindVPX.cmake b/cmake/modules/FindVPX.cmake
new file mode 100644
index 00000000..8c60a555
--- /dev/null
+++ b/cmake/modules/FindVPX.cmake
@@ -0,0 +1,25 @@
+# Try to find VPX
+# Once done this will define
+# VPX_FOUND - System has VPX
+# VPX_INCLUDE_DIRS - The VPX include directories
+# VPX_LIBRARIES - The libraries needed to use VPX
+
+find_package(PkgConfig)
+pkg_check_modules(PC_VPX QUIET libvpx)
+
+find_path(VPX_INCLUDE_DIR vpx/vp8.h
+ HINTS ${PC_VPX_INCLUDEDIR} ${PC_VPX_INCLUDE_DIRS}
+)
+
+find_library(VPX_LIBRARY NAMES vpx
+ HINTS ${PC_VPX_LIBDIR} ${PC_VPX_LIBRARY_DIRS}
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(VPX DEFAULT_MSG VPX_LIBRARY VPX_INCLUDE_DIR)
+
+mark_as_advanced(VPX_INCLUDE_DIR VPX_LIBRARY)
+
+set(VPX_LIBRARIES ${VPX_LIBRARY})
+set(VPX_INCLUDE_DIRS ${VPX_INCLUDE_DIR})
+