mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
GStreamer meson build script cleanup
This commit is contained in:
@@ -39,12 +39,8 @@ have_gtk_gl_windowing = false
|
||||
|
||||
gtk4_dep = dependency('gtk4', required : true)
|
||||
|
||||
if not gtk4_dep.found() or not gtk4_dep.version().version_compare('>=4.0.0')
|
||||
error('GTK4 is missing or is too old')
|
||||
endif
|
||||
|
||||
if not have_gstgl
|
||||
error('GstGL is missing')
|
||||
if not gtk4_dep.version().version_compare('>=4.0.0')
|
||||
error('GTK4 version on this system is too old')
|
||||
endif
|
||||
|
||||
if gst_gl_have_window_x11 and gst_gl_have_platform_glx
|
||||
|
55
lib/meson.build
vendored
55
lib/meson.build
vendored
@@ -204,60 +204,44 @@ gstvideo_dep = dependency('gstreamer-video-1.0', version : gst_req,
|
||||
|
||||
# GStreamer OpenGL
|
||||
gstgl_dep = dependency('gstreamer-gl-1.0', version : gst_req,
|
||||
fallback : ['gst-plugins-base', 'gstgl_dep'], required: false)
|
||||
gstglproto_dep = dependency('', required : false)
|
||||
fallback : ['gst-plugins-base', 'gstgl_dep'], required: true)
|
||||
gstglx11_dep = dependency('', required : false)
|
||||
gstglwayland_dep = dependency('', required : false)
|
||||
gstglegl_dep = dependency('', required : false)
|
||||
|
||||
have_gstgl = gstgl_dep.found()
|
||||
gst_gl_apis = gstgl_dep.get_pkgconfig_variable('gl_apis')
|
||||
gst_gl_winsys = gstgl_dep.get_pkgconfig_variable('gl_winsys')
|
||||
gst_gl_platforms = gstgl_dep.get_pkgconfig_variable('gl_platforms')
|
||||
|
||||
if have_gstgl
|
||||
if gstgl_dep.type_name() == 'pkgconfig'
|
||||
gst_gl_apis = gstgl_dep.get_pkgconfig_variable('gl_apis').split()
|
||||
gst_gl_winsys = gstgl_dep.get_pkgconfig_variable('gl_winsys').split()
|
||||
gst_gl_platforms = gstgl_dep.get_pkgconfig_variable('gl_platforms').split()
|
||||
else
|
||||
gstbase = subproject('gst-plugins-base')
|
||||
gst_gl_apis = gstbase.get_variable('enabled_gl_apis')
|
||||
gst_gl_winsys = gstbase.get_variable('enabled_gl_winsys')
|
||||
gst_gl_platforms = gstbase.get_variable('enabled_gl_platforms')
|
||||
endif
|
||||
message('GStreamer OpenGL window systems: @0@'.format(gst_gl_winsys))
|
||||
message('GStreamer OpenGL platforms: @0@'.format(gst_gl_platforms))
|
||||
message('GStreamer OpenGL apis: @0@'.format(gst_gl_apis))
|
||||
|
||||
message('GStreamer OpenGL window systems: @0@'.format(' '.join(gst_gl_winsys)))
|
||||
message('GStreamer OpenGL platforms: @0@'.format(' '.join(gst_gl_platforms)))
|
||||
message('GStreamer OpenGL apis: @0@'.format(' '.join(gst_gl_apis)))
|
||||
|
||||
foreach ws : ['x11', 'wayland', 'android', 'cocoa', 'eagl', 'win32', 'dispmanx', 'viv_fb']
|
||||
foreach ws : ['x11', 'wayland', 'android', 'cocoa', 'eagl', 'win32', 'dispmanx', 'viv_fb']
|
||||
set_variable('gst_gl_have_window_@0@'.format(ws), gst_gl_winsys.contains(ws))
|
||||
endforeach
|
||||
endforeach
|
||||
|
||||
foreach p : ['glx', 'egl', 'cgl', 'eagl', 'wgl']
|
||||
foreach p : ['glx', 'egl', 'cgl', 'eagl', 'wgl']
|
||||
set_variable('gst_gl_have_platform_@0@'.format(p), gst_gl_platforms.contains(p))
|
||||
endforeach
|
||||
endforeach
|
||||
|
||||
foreach api : ['gl', 'gles2']
|
||||
foreach api : ['gl', 'gles2']
|
||||
set_variable('gst_gl_have_api_@0@'.format(api), gst_gl_apis.contains(api))
|
||||
endforeach
|
||||
endforeach
|
||||
|
||||
gstglproto_dep = dependency('gstreamer-gl-prototypes-1.0', version : gst_req,
|
||||
gstglproto_dep = dependency('gstreamer-gl-prototypes-1.0', version : gst_req,
|
||||
fallback : ['gst-plugins-base', 'gstglproto_dep'], required: true)
|
||||
# Behind specific checks because meson fails at optional dependencies with a
|
||||
# fallback to the same subproject. On the first failure, meson will never
|
||||
# check the system again even if the fallback never existed.
|
||||
# Last checked with meson 0.54.3
|
||||
if gst_gl_have_window_x11
|
||||
if gst_gl_have_window_x11
|
||||
gstglx11_dep = dependency('gstreamer-gl-x11-1.0', version : gst_req,
|
||||
fallback : ['gst-plugins-base', 'gstglx11_dep'], required: true)
|
||||
endif
|
||||
if gst_gl_have_window_wayland
|
||||
endif
|
||||
if gst_gl_have_window_wayland
|
||||
gstglwayland_dep = dependency('gstreamer-gl-wayland-1.0', version : gst_req,
|
||||
fallback : ['gst-plugins-base', 'gstglwayland_dep'], required: true)
|
||||
endif
|
||||
if gst_gl_have_platform_egl
|
||||
endif
|
||||
if gst_gl_have_platform_egl
|
||||
gstglegl_dep = dependency('gstreamer-gl-egl-1.0', version : gst_req,
|
||||
fallback : ['gst-plugins-base', 'gstglegl_dep'], required: true)
|
||||
endif
|
||||
endif
|
||||
|
||||
libm = cc.find_library('m', required : false)
|
||||
@@ -280,7 +264,6 @@ endif
|
||||
configinc = include_directories('.')
|
||||
libsinc = include_directories('gst')
|
||||
|
||||
python3 = import('python').find_installation()
|
||||
gnome = import('gnome')
|
||||
gir = find_program('g-ir-scanner', required : true)
|
||||
|
||||
|
Reference in New Issue
Block a user