aboutsummaryrefslogtreecommitdiff
path: root/cmake/modules/FindVAAPI.cmake
diff options
context:
space:
mode:
authorMarkus Härer <markus.haerer@gmx.net>2024-03-09 17:59:05 +0100
committerGitHub <noreply@github.com>2024-03-09 17:59:05 +0100
commit4ddc576847c1ce6cc24d0957ab0abf50bcba07c8 (patch)
tree7b222da11e5039108f710fe283b7bbed2044cc21 /cmake/modules/FindVAAPI.cmake
parent4a9cb641fb9a418e9c93732155e2fe29c2f74e9a (diff)
parent5f6b42fd111b28d5571923152c47e7094de5e3cd (diff)
Merge pull request #24755 from fuzzard/cmake_fixups_standardisation
[cmake] Find Module cleanup and modernisation
Diffstat (limited to 'cmake/modules/FindVAAPI.cmake')
-rw-r--r--cmake/modules/FindVAAPI.cmake18
1 files changed, 10 insertions, 8 deletions
diff --git a/cmake/modules/FindVAAPI.cmake b/cmake/modules/FindVAAPI.cmake
index f0a5d0599f..90c4bf6e5c 100644
--- a/cmake/modules/FindVAAPI.cmake
+++ b/cmake/modules/FindVAAPI.cmake
@@ -10,6 +10,8 @@
# VAAPI_LIBRARIES - the VAAPI libraries
# VAAPI_DEFINITIONS - the VAAPI definitions
+find_package(PkgConfig)
+
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_VAAPI libva libva-drm libva-wayland libva-x11 QUIET)
endif()
@@ -17,25 +19,25 @@ endif()
set(REQUIRED_VARS "VAAPI_libva_LIBRARY" "VAAPI_libva-drm_LIBRARY" "VAAPI_libva_INCLUDE_DIR" "VAAPI_libva-drm_INCLUDE_DIR")
find_path(VAAPI_libva_INCLUDE_DIR va/va.h
- PATHS ${PC_VAAPI_libva_INCLUDEDIR})
+ HINTS ${PC_VAAPI_libva_INCLUDEDIR})
find_library(VAAPI_libva_LIBRARY NAMES va
- PATHS ${PC_VAAPI_libva_LIBDIR})
+ HINTS ${PC_VAAPI_libva_LIBDIR})
find_path(VAAPI_libva-drm_INCLUDE_DIR va/va_drm.h
- PATHS ${PC_VAAPI_libva-drm_INCLUDEDIR})
+ HINTS ${PC_VAAPI_libva-drm_INCLUDEDIR})
find_library(VAAPI_libva-drm_LIBRARY NAMES va-drm
- PATHS ${PC_VAAPI_libva-drm_LIBDIR})
+ HINTS ${PC_VAAPI_libva-drm_LIBDIR})
if("wayland" IN_LIST CORE_PLATFORM_NAME_LC)
find_path(VAAPI_libva-wayland_INCLUDE_DIR va/va_wayland.h
- PATHS ${PC_VAAPI_libva-wayland_INCLUDEDIR})
+ HINTS ${PC_VAAPI_libva-wayland_INCLUDEDIR})
find_library(VAAPI_libva-wayland_LIBRARY NAMES va-wayland
- PATHS ${PC_VAAPI_libva-wayland_LIBDIR})
+ HINTS ${PC_VAAPI_libva-wayland_LIBDIR})
list(APPEND REQUIRED_VARS "VAAPI_libva-wayland_INCLUDE_DIR" "VAAPI_libva-wayland_LIBRARY")
endif()
if("x11" IN_LIST CORE_PLATFORM_NAME_LC)
find_path(VAAPI_libva-x11_INCLUDE_DIR va/va_x11.h
- PATHS ${PC_VAAPI_libva-x11_INCLUDEDIR})
+ HINTS ${PC_VAAPI_libva-x11_INCLUDEDIR})
find_library(VAAPI_libva-x11_LIBRARY NAMES va-x11
- PATHS ${PC_VAAPI_libva-x11_LIBDIR})
+ HINTS ${PC_VAAPI_libva-x11_LIBDIR})
list(APPEND REQUIRED_VARS "VAAPI_libva-x11_INCLUDE_DIR" "VAAPI_libva-x11_LIBRARY")
endif()