From ca0f0d7b95949ec9625fd856e4a44770282eaa8d Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Tue, 12 Aug 2025 18:22:09 +0200 Subject: [PATCH] meson: handle dep_libdrm before the driver specific libdrm modules Handle dep_libdrm before the driver specific libdrm modules, this is for when libdrm is built as a subproject, for example libdrm_amdgpu is only available after dep_libdrm has been added. Acked-by: Valentine Burley Part-of: --- meson.build | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/meson.build b/meson.build index 29f4898a7ca..103a63225e7 100644 --- a/meson.build +++ b/meson.build @@ -1691,20 +1691,6 @@ endif allow_fallback_for_libdrm = get_option('allow-fallback-for').contains('libdrm') -# Then get each libdrm module -foreach d : _libdrm_checks - if d[1] - set_variable( - 'dep_libdrm_' + d[0], - dependency( - 'libdrm_' + d[0], - version : '>=' + _drm_ver, - allow_fallback: allow_fallback_for_libdrm, - ) - ) - endif -endforeach - with_gallium_drisw_kms = false if system_has_kms_drm dep_libdrm = dependency( @@ -1724,6 +1710,20 @@ if dep_libdrm.found() endif endif +# Then get each libdrm module +foreach d : _libdrm_checks + if d[1] + set_variable( + 'dep_libdrm_' + d[0], + dependency( + 'libdrm_' + d[0], + version : '>=' + _drm_ver, + allow_fallback: allow_fallback_for_libdrm, + ) + ) + endif +endforeach + dep_libudev = dependency('libudev', required : false) if dep_libudev.found() pre_args += '-DHAVE_LIBUDEV'