[gnome-builder/ebassi/c-template] meson-template: Use the gnome module's post install
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/ebassi/c-template] meson-template: Use the gnome module's post install
- Date: Fri, 4 Feb 2022 21:08:14 +0000 (UTC)
commit f086e66d525cd93cb9a4514bc0f9858b9c0c0314
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Feb 4 20:55:51 2022 +0000
meson-template: Use the gnome module's post install
Instead of shipping our own post installation script, we should use the
one provided by the gnome module inside Meson. It's one less file we have
to care about, and the gnome module is integrated into Meson, which means
it'll do some of the heavy lifting for us.
.../resources/build-aux/meson/postinstall.py | 21 ---------------------
src/plugins/meson-templates/resources/meson.build | 12 ++++++++++--
2 files changed, 10 insertions(+), 23 deletions(-)
---
diff --git a/src/plugins/meson-templates/resources/meson.build
b/src/plugins/meson-templates/resources/meson.build
index 793991c48..b053379fa 100644
--- a/src/plugins/meson-templates/resources/meson.build
+++ b/src/plugins/meson-templates/resources/meson.build
@@ -1,7 +1,7 @@
project('{{name}}',{{if language == "c"}} 'c',{{else if language == "c++"}} ['cpp', 'c'],{{else if language
== "vala"}} ['c', 'vala'],{{else if language == "c♯"}} 'cs',{{else if language == "rust"}} 'rust', {{end}}
version: '{{project_version}}',
- meson_version: '>= 0.50.0',
+ meson_version: '>= 0.57.0',
default_options: [ 'warning_level=2',
{{if language == "c"}}
'c_std=gnu11',
@@ -16,6 +16,10 @@ project('{{name}}',{{if language == "c"}} 'c',{{else if language == "c++"}} ['cp
i18n = import('i18n')
{{end}}
+{{if enable_gnome}}
+gnome = import('gnome')
+{{end}}
+
{{if language == "c"}}
config_h = configuration_data()
config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
@@ -48,5 +52,9 @@ subdir('po')
{{end}}
{{if enable_gnome}}
-meson.add_install_script('build-aux/meson/postinstall.py')
+gnome.post_install(
+ glib_compile_schemas: true,
+ gtk_update_icon_cache: true,
+ update_desktop_database: true,
+)
{{end}}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]