mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
gl: Fix libdrm dependency detection and usage
drm_fourcc.h should be picked up via the pkgconfig dep, not the system includedir directly. All this allows it to be picked up consistently (via the subproject, for example). Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7760>
This commit is contained in:
parent
da86a92a2d
commit
dc39ebcd74
4 changed files with 12 additions and 8 deletions
|
@ -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)
|
||||
|
|
|
@ -52,7 +52,9 @@
|
|||
|
||||
#if GST_GL_HAVE_DMABUF
|
||||
#include <gst/allocators/gstdmabuf.h>
|
||||
#include <libdrm/drm_fourcc.h>
|
||||
#ifdef HAVE_LIBDRM
|
||||
#include <drm_fourcc.h>
|
||||
#endif
|
||||
|
||||
#ifndef DRM_FORMAT_R8
|
||||
#define DRM_FORMAT_R8 fourcc_code('R', '8', ' ', ' ')
|
||||
|
|
|
@ -38,7 +38,9 @@
|
|||
|
||||
#if GST_GL_HAVE_DMABUF
|
||||
#include <gst/allocators/gstdmabuf.h>
|
||||
#include <libdrm/drm_fourcc.h>
|
||||
#ifdef HAVE_LIBDRM
|
||||
#include <drm_fourcc.h>
|
||||
#endif
|
||||
#else
|
||||
/* to avoid ifdef in _gst_gl_upload_set_caps_unlocked() */
|
||||
#define DRM_FORMAT_MOD_LINEAR 0ULL
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue