diff options
| author | manuel <manuel@mausz.at> | 2016-11-24 21:27:41 +0100 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2016-11-24 21:27:41 +0100 |
| commit | 8cdf8dec703d882b46ca50a769fabb95ffc48e2c (patch) | |
| tree | f7fe8233508f79d3dc94f8f445ce6342e7dfbdbb /project/cmake/modules/FindVDPAU.cmake | |
| parent | 5823b05feb29a59510c32a9c28ca18b50b9b6399 (diff) | |
| download | kodi-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.cmake | 17 |
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 | ||
| 13 | if(PKG_CONFIG_FOUND) | 17 | if(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 | |||
| 19 | find_library(VDPAU_LIBRARY NAMES vdpau | 23 | find_library(VDPAU_LIBRARY NAMES vdpau |
| 20 | PATHS ${PC_VDPAU_LIBDIR}) | 24 | PATHS ${PC_VDPAU_LIBDIR}) |
| 21 | 25 | ||
| 26 | set(VDPAU_VERSION ${PC_VDPAU_VERSION}) | ||
| 27 | |||
| 22 | include(FindPackageHandleStandardArgs) | 28 | include(FindPackageHandleStandardArgs) |
| 23 | find_package_handle_standard_args(VDPAU | 29 | find_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 | ||
| 26 | if(VDPAU_FOUND) | 33 | if(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() | ||
| 30 | endif() | 45 | endif() |
| 31 | 46 | ||
| 32 | mark_as_advanced(VDPAU_INCLUDE_DIR VDPAU_LIBRARY) | 47 | mark_as_advanced(VDPAU_INCLUDE_DIR VDPAU_LIBRARY) |
