Skip to content

meson: Forcefully disable `libdrm` when the host doesn't have it

Mark Collins requested to merge PixelyIon/mesa:libdrm-disable into main

In certain cases, libdrm isn't available on the host as signaled by system_has_kms_drm but can sometimes be transitively depended upon resulting in accidental dependencies in these cases. An example of this is Android devices shipping with KGSL which are unlikely to have DRM and attempting to link to it results in linker failures, as a result it needs to be disabled in cases where only KGSL is being built and while Turnip's meson.build conditionally doesn't include libdrm in this case, it depends on vk_runtime which depends on libdrm and causes the linker error regardless. To fix this, libdrm_dep is now replaced with a null dependency when system_has_kms_drm is set.

Merge request reports