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/7932>
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