meson: Do not require libdrm for DRI2 on hurd
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 28 Dec 2019 21:51:39 +0000 (22:51 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 22 Jan 2020 23:15:05 +0000 (23:15 +0000)
Cc: 19.3 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3231>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3231>

meson.build

index 2cf0ee7fe0c20e74f8b2c40b4c58c98aa623b22e..c48945b3c48d2204d9cb3ceb50e0b27f89f336d1 100644 (file)
@@ -436,6 +436,7 @@ if with_vulkan_icd_dir == ''
   with_vulkan_icd_dir = join_paths(get_option('datadir'), 'vulkan/icd.d')
 endif
 
+# GNU/Hurd includes egl_dri2, without drm.
 with_dri2 = (with_dri or with_any_vk) and (with_dri_platform == 'drm' or
   host_machine.system() == 'gnu')
 _dri3 = get_option('dri3')
@@ -1358,7 +1359,8 @@ endforeach
 with_gallium_drisw_kms = false
 dep_libdrm = dependency(
   'libdrm', version : '>=' + _drm_ver,
-  required : with_dri2 or with_dri3
+  # GNU/Hurd includes egl_dri2, without drm.
+  required : (with_dri2 and host_machine.system() != 'gnu') or with_dri3
 )
 if dep_libdrm.found()
   pre_args += '-DHAVE_LIBDRM'