Commit 1bace075 authored by Sam Thursfield's avatar Sam Thursfield

build: Compile GSettings schemas after install

This isn't needed in the common case of distro package builds, as the
distro package will already provide a hook. However, our README.md
tells developers to install into a prefix like ~/opt/tracker, and
that is broken by default because GLib will complain that none of the
settings schemas are installed.
parent 6a9199a8
......@@ -62,7 +62,7 @@ endif
custom_target('tracker-miners-compile-schemas',
output: 'gschemas.compiled',
command: [find_program('glib-compile-schemas'), meson.current_build_dir()],
command: [glib_compile_schemas, meson.current_build_dir()],
build_by_default: true,
depends: compile_schemas_deps)
......
......@@ -400,6 +400,7 @@ tracker_uninstalled_writeback_modules_dir = join_paths(meson.current_build_dir()
gsettings_schema_dir = join_paths(get_option('prefix'), get_option('datadir'), 'glib-2.0', 'schemas')
glib_compile_schemas = find_program('glib-compile-schemas')
glib_mkenums = find_program('glib-mkenums')
subdir('src')
......@@ -418,6 +419,8 @@ subdir('tests')
subdir('po')
meson.add_install_script('meson_integration_commands.sh', glib_compile_schemas.path(), gsettings_schema_dir)
summary = [
'\nBuild Configuration:',
' Prefix: ' + get_option('prefix'),
......
#!/bin/sh
# Post install triggers.
#
# These are needed when following the developer workflow that we suggest in
# README.md, of installing into an isolated prefix like ~/opt/tracker.
set -e
GLIB_COMPILE_SCHEMAS=$1
GSETTINGS_SCHEMAS_DIR=$2
if [ -z "$DESTDIR" ]; then
$GLIB_COMPILE_SCHEMAS $GSETTINGS_SCHEMAS_DIR
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment