4 # Finds the VDPAU library
6 # This will define the following target:
8 # ${APP_NAME_LC}::VDPAU - The VDPAU library
10 if(NOT TARGET ${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME})
11 find_package(PkgConfig)
13 pkg_check_modules(PC_VDPAU vdpau QUIET)
16 find_path(VDPAU_INCLUDE_DIR NAMES vdpau/vdpau.h vdpau/vdpau_x11.h
17 HINTS ${PC_VDPAU_INCLUDEDIR})
18 find_library(VDPAU_LIBRARY NAMES vdpau
19 HINTS ${PC_VDPAU_LIBDIR})
21 set(VDPAU_VERSION ${PC_VDPAU_VERSION})
23 include(FindPackageHandleStandardArgs)
24 find_package_handle_standard_args(VDPAU
25 REQUIRED_VARS VDPAU_LIBRARY VDPAU_INCLUDE_DIR
26 VERSION_VAR VDPAU_VERSION)
29 add_library(${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME} UNKNOWN IMPORTED)
30 set_target_properties(${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME} PROPERTIES
31 IMPORTED_LOCATION "${VDPAU_LIBRARY}"
32 INTERFACE_INCLUDE_DIRECTORIES "${VDPAU_INCLUDE_DIR}"
33 INTERFACE_COMPILE_DEFINITIONS HAVE_LIBVDPAU)