mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 05:01:23 +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
|
optional_deps += bcm_host_dep
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if egl_dep.found() and cc.has_header('libdrm/drm_fourcc.h')
|
if egl_dep.found() and cc.has_header('drm_fourcc.h', dependencies: libdrm_dep)
|
||||||
optional_deps += allocators_dep
|
optional_deps += [allocators_dep, libdrm_dep]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if ['darwin', 'ios'].contains(host_system)
|
if ['darwin', 'ios'].contains(host_system)
|
||||||
|
|
|
@ -52,7 +52,9 @@
|
||||||
|
|
||||||
#if GST_GL_HAVE_DMABUF
|
#if GST_GL_HAVE_DMABUF
|
||||||
#include <gst/allocators/gstdmabuf.h>
|
#include <gst/allocators/gstdmabuf.h>
|
||||||
#include <libdrm/drm_fourcc.h>
|
#ifdef HAVE_LIBDRM
|
||||||
|
#include <drm_fourcc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef DRM_FORMAT_R8
|
#ifndef DRM_FORMAT_R8
|
||||||
#define DRM_FORMAT_R8 fourcc_code('R', '8', ' ', ' ')
|
#define DRM_FORMAT_R8 fourcc_code('R', '8', ' ', ' ')
|
||||||
|
|
|
@ -38,7 +38,9 @@
|
||||||
|
|
||||||
#if GST_GL_HAVE_DMABUF
|
#if GST_GL_HAVE_DMABUF
|
||||||
#include <gst/allocators/gstdmabuf.h>
|
#include <gst/allocators/gstdmabuf.h>
|
||||||
#include <libdrm/drm_fourcc.h>
|
#ifdef HAVE_LIBDRM
|
||||||
|
#include <drm_fourcc.h>
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
/* to avoid ifdef in _gst_gl_upload_set_caps_unlocked() */
|
/* to avoid ifdef in _gst_gl_upload_set_caps_unlocked() */
|
||||||
#define DRM_FORMAT_MOD_LINEAR 0ULL
|
#define DRM_FORMAT_MOD_LINEAR 0ULL
|
||||||
|
|
|
@ -566,8 +566,8 @@ if need_platform_egl != 'no'
|
||||||
gl_platform_deps += egl_dep
|
gl_platform_deps += egl_dep
|
||||||
glconf.set('GST_GL_HAVE_PLATFORM_EGL', 1)
|
glconf.set('GST_GL_HAVE_PLATFORM_EGL', 1)
|
||||||
|
|
||||||
if cc.has_header('libdrm/drm_fourcc.h')
|
if cc.has_header('drm_fourcc.h', dependencies: libdrm_dep)
|
||||||
gl_misc_deps += allocators_dep
|
gl_misc_deps += [allocators_dep, libdrm_dep]
|
||||||
glconf.set('GST_GL_HAVE_DMABUF', 1)
|
glconf.set('GST_GL_HAVE_DMABUF', 1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -1103,8 +1103,8 @@ if build_gstgl
|
||||||
soversion : soversion,
|
soversion : soversion,
|
||||||
darwin_versions : osxversion,
|
darwin_versions : osxversion,
|
||||||
install : true,
|
install : true,
|
||||||
dependencies : [gst_base_dep, video_dep, allocators_dep, gmodule_dep,
|
dependencies : [gst_base_dep, video_dep, gmodule_dep, gl_lib_deps,
|
||||||
gl_lib_deps, gl_platform_deps, gl_winsys_deps, gl_misc_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
|
# don't confuse EGL/egl.h with gst-libs/gl/egl/egl.h on case-insensitive file systems
|
||||||
implicit_include_directories : false)
|
implicit_include_directories : false)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue