Warning, /graphics/digikam/core/cmake/modules/FindVDPAU.cmake is written in an unsupported language. File is not indexed.
0001 # Finds the VDPAU library (https://en.wikipedia.org/wiki/VDPAU)
0002 #
0003 # This will define the following variables:
0004 #
0005 # VDPAU_FOUND - system has VDPAU
0006 # VDPAU_INCLUDE_DIRS - the VDPAU include directory
0007 # VDPAU_LIBRARIES - the VDPAU libraries
0008 # VDPAU_DEFINITIONS - the VDPAU definitions
0009 #
0010 # SPDX-FileCopyrightText: 2016-2024 by Gilles Caulier, <caulier dot gilles at gmail dot com>
0011 #
0012 # SPDX-License-Identifier: BSD-3-Clause
0013 #
0014
0015 find_package(PkgConfig)
0016
0017 if(PKG_CONFIG_FOUND)
0018 pkg_check_modules(PC_VDPAU vdpau QUIET)
0019 endif()
0020
0021 find_path(VDPAU_INCLUDE_DIR NAMES vdpau/vdpau.h vdpau/vdpau_x11.h
0022 PATHS ${PC_VDPAU_INCLUDEDIR}
0023 NO_CACHE)
0024
0025 find_library(VDPAU_LIBRARY NAMES vdpau
0026 PATHS ${PC_VDPAU_LIBDIR}
0027 NO_CACHE)
0028
0029 set(VDPAU_VERSION ${PC_VDPAU_VERSION})
0030
0031 include(FindPackageHandleStandardArgs)
0032
0033 find_package_handle_standard_args(VDPAU
0034 REQUIRED_VARS VDPAU_LIBRARY VDPAU_INCLUDE_DIR
0035 VERSION_VAR VDPAU_VERSION)
0036
0037 if(VDPAU_FOUND)
0038
0039 set(VDPAU_INCLUDE_DIRS ${VDPAU_INCLUDE_DIR})
0040 set(VDPAU_LIBRARIES ${VDPAU_LIBRARY})
0041 set(VDPAU_DEFINITIONS -DHAVE_LIBVDPAU=1)
0042
0043 endif()
0044
0045 mark_as_advanced(VDPAU_INCLUDE_DIR
0046 VDPAU_LIBRARY)