meson: compile gschemas after installing

As some users or developers might choose to install repo builds, they
would also have to compile the installed GSettings schema manually. This
commit adds a script that does that post-install.

https://bugzilla.gnome.org/show_bug.cgi?id=779669
This commit is contained in:
Ernestas Kulik 2017-03-07 11:24:54 +02:00
parent ef7005eae6
commit 9419c26876
2 changed files with 10 additions and 0 deletions

7
compile_gschemas.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/sh
# Avoid compiling schemas when packaging.
if [ -z "$DESTDIR" ]
then
glib-compile-schemas "${MESON_INSTALL_PREFIX}/share/glib-2.0/schemas"
fi

View file

@ -128,3 +128,6 @@ endif
if get_option ('enable-nst-extension') if get_option ('enable-nst-extension')
subdir ('nautilus-sendto-extension') subdir ('nautilus-sendto-extension')
endif endif
# Compile GSettings schemas when installing from source.
meson.add_install_script ('compile_gschemas.sh')