From 77d52eb507474ae5a2c1b2f540e3c67945eaea37 Mon Sep 17 00:00:00 2001 From: Niels Ole Salscheider Date: Sun, 3 Sep 2017 22:27:25 +0200 Subject: Re-add codecs support to the build system --- cmake/modules/FindVPX.cmake | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 cmake/modules/FindVPX.cmake (limited to 'cmake/modules/FindVPX.cmake') 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}) + -- cgit v1.2.3