From 090e01b3832c37bb3fd0af070650e942e287a3fc Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 15 Aug 2023 13:35:46 -0400 Subject: [PATCH 1/2] 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 d325b4edea2..c6e6236ca8e 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 004333141c5..2217b947add 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') -- GitLab From d6a07cd61763d2e0fa4e111dad34f0762738ce6f Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 15 Aug 2023 21:17:23 -0400 Subject: [PATCH 2/2] meson: Add x11_dep to gtk4-x11 requires --- gdk/x11/meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdk/x11/meson.build b/gdk/x11/meson.build index 58d12bb8a1c..013d8b1d00c 100644 --- a/gdk/x11/meson.build +++ b/gdk/x11/meson.build @@ -86,3 +86,5 @@ libgdk_x11 = static_library('gdk-x11', ] + common_cflags, dependencies: [ gdk_deps, gdk_x11_deps, ], ) + +x11_public_deps = [x11_dep] -- GitLab