meson: Fix build with gtk3 but not wayland

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8222>
This commit is contained in:
Samuel Thibault 2024-12-30 21:59:03 +01:00 committed by GStreamer Marge Bot
parent cc7c3183f4
commit 727424452a
3 changed files with 26 additions and 16 deletions
subprojects/gst-plugins-bad
ext/gtk
tests/examples

@ -1,3 +1,7 @@
if not use_wayland
subdir_done()
endif
gtkwayland_sources = [
'gstplugin.c',
'gstgtkutils.c',
@ -9,7 +13,7 @@ gtkwayland_sources = [
gtk_dep = dependency('gtk+-3.0', required : get_option('gtk3'))
gtk_wayland_dep = dependency('gtk+-wayland-3.0', required : get_option('gtk3'))
if gtk_dep.found() and gtk_wayland_dep.found() and use_wayland
if gtk_dep.found() and gtk_wayland_dep.found()
gstgtkwayland = library('gstgtkwayland',
gtkwayland_sources,
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'],

@ -1,4 +1,8 @@
if gtk_dep.found() and gtk_wayland_dep.found() and use_wayland
if not use_wayland
subdir_done()
endif
if gtk_dep.found() and gtk_wayland_dep.found()
executable('gtkwaylandsink',
'gtkwaylandsink.c',
extra_files: ['window.ui'],

@ -1,22 +1,24 @@
if not use_wayland
subdir_done()
endif
gtk_dep = dependency('gtk+-3.0', required : get_option('examples'))
gtk_wayland_dep = dependency('gtk+-wayland-3.0', required : get_option('examples'))
if use_wayland
if gtk_dep.found() and gtk_wayland_dep.found()
executable('waylandsink',
'main.c',
extra_files: ['window.ui'],
install: false,
include_directories : [configinc],
dependencies : [gtk_dep, gtk_wayland_dep, gst_dep, gstwayland_dep],
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'],
)
endif
executable('wayland_threads',
'wayland-threads.c',
if gtk_dep.found() and gtk_wayland_dep.found()
executable('waylandsink',
'main.c',
extra_files: ['window.ui'],
install: false,
include_directories : [configinc],
dependencies : [gst_dep, gstwayland_dep, wl_client_dep],
dependencies : [gtk_dep, gtk_wayland_dep, gst_dep, gstwayland_dep],
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'],
)
endif
executable('wayland_threads',
'wayland-threads.c',
install: false,
include_directories : [configinc],
dependencies : [gst_dep, gstwayland_dep, wl_client_dep],
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'],
)