From 9fc8b732737f139d3e466510d75668ab45578960 Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 8 Mar 2016 21:02:53 +0100 Subject: sync with upstream --- project/cmake/modules/FindVDPAU.cmake | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 project/cmake/modules/FindVDPAU.cmake (limited to 'project/cmake/modules/FindVDPAU.cmake') diff --git a/project/cmake/modules/FindVDPAU.cmake b/project/cmake/modules/FindVDPAU.cmake new file mode 100644 index 0000000..680b45f --- /dev/null +++ b/project/cmake/modules/FindVDPAU.cmake @@ -0,0 +1,32 @@ +#.rst: +# FindVDPAU +# --------- +# Finds the VDPAU library +# +# This will will define the following variables:: +# +# VDPAU_FOUND - system has VDPAU +# VDPAU_INCLUDE_DIRS - the VDPAU include directory +# VDPAU_LIBRARIES - the VDPAU libraries +# VDPAU_DEFINITIONS - the VDPAU definitions + +if(PKG_CONFIG_FOUND) + pkg_check_modules(PC_VDPAU vdpau QUIET) +endif() + +find_path(VDPAU_INCLUDE_DIR NAMES vdpau/vdpau.h vdpau/vdpau_x11.h + PATHS ${PC_VDPAU_INCLUDEDIR}) +find_library(VDPAU_LIBRARY NAMES vdpau + PATHS ${PC_VDPAU_LIBDIR}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(VDPAU + REQUIRED_VARS VDPAU_LIBRARY VDPAU_INCLUDE_DIR) + +if(VDPAU_FOUND) + set(VDPAU_INCLUDE_DIRS ${VDPAU_INCLUDE_DIR}) + set(VDPAU_LIBRARIES ${VDPAU_LIBRARY}) + set(VDPAU_DEFINITIONS -DHAVE_LIBVDPAU=1) +endif() + +mark_as_advanced(VDPAU_INCLUDE_DIR VDPAU_LIBRARY) -- cgit v1.2.3