meson: Don't use libdrm_dep in cc.has_header()

It can't handle subproject dependencies. Pointed out in
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4033#note_2665974

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7927>
This commit is contained in:
Nirbheek Chauhan 2024-11-20 04:23:32 +05:30 committed by GStreamer Marge Bot
parent 51c6aa9e2f
commit c1a8ee9655

View file

@ -114,7 +114,13 @@ if bcm_host_dep.found()
optional_deps += bcm_host_dep
endif
if egl_dep.found() and cc.has_header('drm_fourcc.h', dependencies: libdrm_dep)
if libdrm_dep.type_name() == 'internal'
drm_has_fourcc = true
else
drm_has_fourcc = cc.has_header('drm_fourcc.h', dependencies: libdrm_dep)
endif
if egl_dep.found() and drm_has_fourcc
optional_deps += [allocators_dep, libdrm_dep]
endif