summaryrefslogtreecommitdiffstats
path: root/project/cmake/modules/FindVDPAU.cmake
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2016-11-24 21:27:41 +0100
committermanuel <manuel@mausz.at>2016-11-24 21:27:41 +0100
commit8cdf8dec703d882b46ca50a769fabb95ffc48e2c (patch)
treef7fe8233508f79d3dc94f8f445ce6342e7dfbdbb /project/cmake/modules/FindVDPAU.cmake
parent5823b05feb29a59510c32a9c28ca18b50b9b6399 (diff)
downloadkodi-pvr-build-8cdf8dec703d882b46ca50a769fabb95ffc48e2c.tar.gz
kodi-pvr-build-8cdf8dec703d882b46ca50a769fabb95ffc48e2c.tar.bz2
kodi-pvr-build-8cdf8dec703d882b46ca50a769fabb95ffc48e2c.zip
sync with upstream
Diffstat (limited to 'project/cmake/modules/FindVDPAU.cmake')
-rw-r--r--project/cmake/modules/FindVDPAU.cmake17
1 files changed, 16 insertions, 1 deletions
diff --git a/project/cmake/modules/FindVDPAU.cmake b/project/cmake/modules/FindVDPAU.cmake
index 680b45f..b99e03f 100644
--- a/project/cmake/modules/FindVDPAU.cmake
+++ b/project/cmake/modules/FindVDPAU.cmake
@@ -9,6 +9,10 @@
9# VDPAU_INCLUDE_DIRS - the VDPAU include directory 9# VDPAU_INCLUDE_DIRS - the VDPAU include directory
10# VDPAU_LIBRARIES - the VDPAU libraries 10# VDPAU_LIBRARIES - the VDPAU libraries
11# VDPAU_DEFINITIONS - the VDPAU definitions 11# VDPAU_DEFINITIONS - the VDPAU definitions
12#
13# and the following imported targets::
14#
15# VDPAU::VDPAU - The VDPAU library
12 16
13if(PKG_CONFIG_FOUND) 17if(PKG_CONFIG_FOUND)
14 pkg_check_modules(PC_VDPAU vdpau QUIET) 18 pkg_check_modules(PC_VDPAU vdpau QUIET)
@@ -19,14 +23,25 @@ find_path(VDPAU_INCLUDE_DIR NAMES vdpau/vdpau.h vdpau/vdpau_x11.h
19find_library(VDPAU_LIBRARY NAMES vdpau 23find_library(VDPAU_LIBRARY NAMES vdpau
20 PATHS ${PC_VDPAU_LIBDIR}) 24 PATHS ${PC_VDPAU_LIBDIR})
21 25
26set(VDPAU_VERSION ${PC_VDPAU_VERSION})
27
22include(FindPackageHandleStandardArgs) 28include(FindPackageHandleStandardArgs)
23find_package_handle_standard_args(VDPAU 29find_package_handle_standard_args(VDPAU
24 REQUIRED_VARS VDPAU_LIBRARY VDPAU_INCLUDE_DIR) 30 REQUIRED_VARS VDPAU_LIBRARY VDPAU_INCLUDE_DIR
31 VERSION_VAR VDPAU_VERSION)
25 32
26if(VDPAU_FOUND) 33if(VDPAU_FOUND)
27 set(VDPAU_INCLUDE_DIRS ${VDPAU_INCLUDE_DIR}) 34 set(VDPAU_INCLUDE_DIRS ${VDPAU_INCLUDE_DIR})
28 set(VDPAU_LIBRARIES ${VDPAU_LIBRARY}) 35 set(VDPAU_LIBRARIES ${VDPAU_LIBRARY})
29 set(VDPAU_DEFINITIONS -DHAVE_LIBVDPAU=1) 36 set(VDPAU_DEFINITIONS -DHAVE_LIBVDPAU=1)
37
38 if(NOT TARGET VDPAU::VDPAU)
39 add_library(VDPAU::VDPAU UNKNOWN IMPORTED)
40 set_target_properties(VDPAU::VDPAU PROPERTIES
41 IMPORTED_LOCATION "${VDPAU_LIBRARY}"
42 INTERFACE_INCLUDE_DIRECTORIES "${VDPAU_INCLUDE_DIR}"
43 INTERFACE_COMPILE_DEFINITIONS HAVE_LIBVDPAU=1)
44 endif()
30endif() 45endif()
31 46
32mark_as_advanced(VDPAU_INCLUDE_DIR VDPAU_LIBRARY) 47mark_as_advanced(VDPAU_INCLUDE_DIR VDPAU_LIBRARY)