diff --git a/subprojects/gst-plugins-base/ext/gl/meson.build b/subprojects/gst-plugins-base/ext/gl/meson.build index ad514014e9..2715a37129 100644 --- a/subprojects/gst-plugins-base/ext/gl/meson.build +++ b/subprojects/gst-plugins-base/ext/gl/meson.build @@ -114,8 +114,8 @@ if bcm_host_dep.found() optional_deps += bcm_host_dep endif -if egl_dep.found() and cc.has_header('libdrm/drm_fourcc.h') - optional_deps += allocators_dep +if egl_dep.found() and cc.has_header('drm_fourcc.h', dependencies: libdrm_dep) + optional_deps += [allocators_dep, libdrm_dep] endif if ['darwin', 'ios'].contains(host_system) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gsteglimage.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gsteglimage.c index b70fd59fe5..c3ee82afdb 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gsteglimage.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gsteglimage.c @@ -52,7 +52,9 @@ #if GST_GL_HAVE_DMABUF #include -#include +#ifdef HAVE_LIBDRM +#include +#endif #ifndef DRM_FORMAT_R8 #define DRM_FORMAT_R8 fourcc_code('R', '8', ' ', ' ') diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c index d91898a1fc..bafd804fe8 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c @@ -38,7 +38,9 @@ #if GST_GL_HAVE_DMABUF #include -#include +#ifdef HAVE_LIBDRM +#include +#endif #else /* to avoid ifdef in _gst_gl_upload_set_caps_unlocked() */ #define DRM_FORMAT_MOD_LINEAR 0ULL diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build b/subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build index b97ec0c049..57af08ced3 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build @@ -566,8 +566,8 @@ if need_platform_egl != 'no' gl_platform_deps += egl_dep glconf.set('GST_GL_HAVE_PLATFORM_EGL', 1) - if cc.has_header('libdrm/drm_fourcc.h') - gl_misc_deps += allocators_dep + if cc.has_header('drm_fourcc.h', dependencies: libdrm_dep) + gl_misc_deps += [allocators_dep, libdrm_dep] glconf.set('GST_GL_HAVE_DMABUF', 1) endif @@ -1103,8 +1103,8 @@ if build_gstgl soversion : soversion, darwin_versions : osxversion, install : true, - dependencies : [gst_base_dep, video_dep, allocators_dep, gmodule_dep, - gl_lib_deps, gl_platform_deps, gl_winsys_deps, gl_misc_deps], + dependencies : [gst_base_dep, video_dep, gmodule_dep, gl_lib_deps, + gl_platform_deps, gl_winsys_deps, gl_misc_deps], # don't confuse EGL/egl.h with gst-libs/gl/egl/egl.h on case-insensitive file systems implicit_include_directories : false)