From 090e01b3832c37bb3fd0af070650e942e287a3fc Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 15 Aug 2023 13:35:46 -0400 Subject: [PATCH] meson: Add wayland-client to gtk4-wayland requires --- gdk/wayland/meson.build | 3 +++ meson.build | 17 +++++++---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gdk/wayland/meson.build b/gdk/wayland/meson.build index d325b4edea..c6e6236ca8 100644 --- a/gdk/wayland/meson.build +++ b/gdk/wayland/meson.build @@ -127,3 +127,6 @@ libgdk_wayland = static_library('gdk-wayland', link_with: [ libwayland_cursor, ], dependencies: [ gdk_deps, gdk_wayland_deps ], ) + +# Used to generate pkg-config Requires +wayland_public_deps = [wlclientdep] diff --git a/meson.build b/meson.build index 004333141c..2217b947ad 100644 --- a/meson.build +++ b/meson.build @@ -826,19 +826,15 @@ gsk_private_packages = [] # all already in gdk_private_packages pangoft2_pkgs = (wayland_enabled or x11_enabled) ? ['pangoft2'] : [] gtk_private_packages = pangoft2_pkgs -pkgs = [] -pkg_targets = [] -display_backends = [] +enabled_backends = [] foreach backend: [ 'broadway', 'macos', 'wayland', 'win32', 'x11', ] if get_variable('@0@_enabled'.format(backend)) - pkgs += ['gtk4-@0@'.format(backend)] - pkg_targets += backend - display_backends += [ backend ] + enabled_backends += backend endif endforeach common_pc_variables = [ - 'targets=@0@'.format(' '.join(pkg_targets)), + 'targets=@0@'.format(' '.join(enabled_backends)), 'gtk_binary_version=@0@'.format(gtk_binary_version), 'gtk_host=@0@-@1@'.format(host_machine.cpu_family(), host_machine.system()), # FIXME ] @@ -853,13 +849,14 @@ pkg_config.generate(libgtk, ) meson.override_dependency('gtk4', libgtk_dep) -foreach pkg: pkgs +foreach backend: enabled_backends + pkg = 'gtk4-@0@'.format(backend) pkg_config.generate( filebase: pkg, unescaped_variables: common_pc_variables, name: 'GTK', description: 'GTK Graphical UI Library', - requires: 'gtk4', + requires: ['gtk4', get_variable('@0@_public_deps'.format(backend), [])], ) meson.override_dependency(pkg, libgtk_dep) endforeach @@ -904,7 +901,7 @@ endif #### Summary #### -summary('Display backends', display_backends, section: 'Components') +summary('Display backends', enabled_backends, section: 'Components') summary('Print backends', print_backends, section: 'Components') summary('Media backends', media_backends, section: 'Components')