mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-01-22 05:33:55 +08:00
meson: forcefully disable libdrm when host doesn't have it
Signed-off-by: Mark Collins <mark@igalia.com> Reviewed-by: Eric Engestrom <eric@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21724>
This commit is contained in:
parent
952bd63d6d
commit
66d2ae0386
16
meson.build
16
meson.build
@ -1567,11 +1567,17 @@ foreach d : _libdrm_checks
|
||||
endforeach
|
||||
|
||||
with_gallium_drisw_kms = false
|
||||
dep_libdrm = dependency(
|
||||
'libdrm', version : '>=' + _drm_ver,
|
||||
# GNU/Hurd includes egl_dri2, without drm.
|
||||
required : (with_dri2 and host_machine.system() != 'gnu') or with_dri3
|
||||
)
|
||||
if system_has_kms_drm
|
||||
dep_libdrm = dependency(
|
||||
'libdrm', version : '>=' + _drm_ver,
|
||||
# GNU/Hurd includes egl_dri2, without drm.
|
||||
required : (with_dri2 and host_machine.system() != 'gnu') or with_dri3
|
||||
)
|
||||
else
|
||||
# We should prevent libdrm from being available when the target doesn't have it to avoid transitive
|
||||
# dependencies (such as vk-runtime) linking to it
|
||||
dep_libdrm = null_dep
|
||||
endif
|
||||
if dep_libdrm.found()
|
||||
pre_args += '-DHAVE_LIBDRM'
|
||||
if with_dri_platform == 'drm' and with_dri
|
||||
|
@ -67,11 +67,6 @@ if with_xlib_lease
|
||||
tu_deps += [dep_xlib_xrandr]
|
||||
endif
|
||||
|
||||
if not system_has_kms_drm
|
||||
# Even if libdrm is available we shouldn't use it in KGSL-only build
|
||||
tu_flags += '-UHAVE_LIBDRM'
|
||||
endif
|
||||
|
||||
if freedreno_kmds.contains('kgsl')
|
||||
tu_flags += '-DTU_HAS_KGSL'
|
||||
libtu_files += files('tu_knl_kgsl.c')
|
||||
|
Loading…
Reference in New Issue
Block a user