From c1a8ee965542e5e2d2d7f7b2c1c836b6cb53ae3c Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Wed, 20 Nov 2024 04:23:32 +0530 Subject: [PATCH] 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: --- subprojects/gst-plugins-base/ext/gl/meson.build | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-base/ext/gl/meson.build b/subprojects/gst-plugins-base/ext/gl/meson.build index 2715a37129..743760d837 100644 --- a/subprojects/gst-plugins-base/ext/gl/meson.build +++ b/subprojects/gst-plugins-base/ext/gl/meson.build @@ -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