Meson: Use gnome.post_install()

See https://github.com/mesonbuild/meson/pull/8272 and
https://github.com/mesonbuild/meson/issues/8268.
This commit is contained in:
Xavier Claessens 2021-01-29 18:46:32 -05:00
parent cba8c40aa0
commit 629e70f89d
4 changed files with 17 additions and 7 deletions

View File

@ -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

View File

@ -1,3 +1,4 @@
gio_module_dirs = []
if os_unix
subdir('printbackends')
else

View File

@ -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',

View File

@ -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