summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-01-29 18:46:32 -0500
committerXavier Claessens <xavier.claessens@collabora.com>2021-03-08 21:19:09 -0500
commit629e70f89dd1c8c4a1b80f0ea67e6e7e4698485c (patch)
tree6a9caa8e75e698d7973ef0f26df128625be12b69
parentcba8c40aa0818b8501c46c4ff2d5c8785d32a3c1 (diff)
downloadgtk+-629e70f89dd1c8c4a1b80f0ea67e6e7e4698485c.tar.gz
Meson: Use gnome.post_install()
See https://github.com/mesonbuild/meson/pull/8272 and https://github.com/mesonbuild/meson/issues/8268.
-rw-r--r--meson.build21
-rw-r--r--modules/meson.build1
-rw-r--r--modules/printbackends/meson.build1
-rw-r--r--tools/meson.build1
4 files changed, 17 insertions, 7 deletions
diff --git a/meson.build b/meson.build
index 145a848a86..a60e061b96 100644
--- a/meson.build
+++ b/meson.build
@@ -798,14 +798,21 @@ subdir('po-properties')
subdir('docs/tools')
subdir('docs/reference')
-# Keep this in sync with post-install.sh expected arguments
if not meson.is_cross_build()
- meson.add_install_script('build-aux/meson/post-install.py',
- gtk_api_version,
- gtk_binary_version,
- gtk_libdir,
- gtk_datadir,
- gtk_bindir)
+ if meson.version().version_compare('>=0.57.0')
+ gnome.post_install(
+ glib_compile_schemas: true,
+ gio_querymodules: gio_module_dirs,
+ gtk_update_icon_cache: true,
+ )
+ else
+ meson.add_install_script('build-aux/meson/post-install.py',
+ gtk_api_version,
+ gtk_binary_version,
+ gtk_libdir,
+ gtk_datadir,
+ gtk_bindir)
+ endif
else
message('Not executing post-install steps automatically when cross compiling')
endif
diff --git a/modules/meson.build b/modules/meson.build
index 614be805f5..4bd67114f8 100644
--- a/modules/meson.build
+++ b/modules/meson.build
@@ -1,3 +1,4 @@
+gio_module_dirs = []
if os_unix
subdir('printbackends')
else
diff --git a/modules/printbackends/meson.build b/modules/printbackends/meson.build
index fa55d60e3b..833a160747 100644
--- a/modules/printbackends/meson.build
+++ b/modules/printbackends/meson.build
@@ -2,6 +2,7 @@ print_backends = []
printbackends_subdir = 'gtk-4.0/@0@/printbackends'.format(gtk_binary_version)
printbackends_install_dir = join_paths(get_option('libdir'), printbackends_subdir)
+gio_module_dirs += printbackends_install_dir
printbackends_args = [
'-DGTK_COMPILATION',
diff --git a/tools/meson.build b/tools/meson.build
index 7b82caf132..1811b6969e 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -51,6 +51,7 @@ foreach tool: gtk_tools
)
set_variable(tool_name.underscorify(), exe) # used in testsuites
+ meson.override_find_program(tool_name, exe)
endforeach
# Data to install