summaryrefslogtreecommitdiffstats
path: root/project/cmake/modules/FindVDPAU.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'project/cmake/modules/FindVDPAU.cmake')
-rw-r--r--project/cmake/modules/FindVDPAU.cmake32
1 files changed, 32 insertions, 0 deletions
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 @@
1#.rst:
2# FindVDPAU
3# ---------
4# Finds the VDPAU library
5#
6# This will will define the following variables::
7#
8# VDPAU_FOUND - system has VDPAU
9# VDPAU_INCLUDE_DIRS - the VDPAU include directory
10# VDPAU_LIBRARIES - the VDPAU libraries
11# VDPAU_DEFINITIONS - the VDPAU definitions
12
13if(PKG_CONFIG_FOUND)
14 pkg_check_modules(PC_VDPAU vdpau QUIET)
15endif()
16
17find_path(VDPAU_INCLUDE_DIR NAMES vdpau/vdpau.h vdpau/vdpau_x11.h
18 PATHS ${PC_VDPAU_INCLUDEDIR})
19find_library(VDPAU_LIBRARY NAMES vdpau
20 PATHS ${PC_VDPAU_LIBDIR})
21
22include(FindPackageHandleStandardArgs)
23find_package_handle_standard_args(VDPAU
24 REQUIRED_VARS VDPAU_LIBRARY VDPAU_INCLUDE_DIR)
25
26if(VDPAU_FOUND)
27 set(VDPAU_INCLUDE_DIRS ${VDPAU_INCLUDE_DIR})
28 set(VDPAU_LIBRARIES ${VDPAU_LIBRARY})
29 set(VDPAU_DEFINITIONS -DHAVE_LIBVDPAU=1)
30endif()
31
32mark_as_advanced(VDPAU_INCLUDE_DIR VDPAU_LIBRARY)