build: Simplify construction of glib_localstatedir

`join_paths()` automatically drops all preceding path elements if an
argument to it is an absolute path. The `/` is a tidier synonym for
`join_paths()`.

This introduces no functional changes.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall 2022-11-30 13:22:02 +00:00
parent 5f945e5464
commit 3bbe96ca89

View File

@ -123,11 +123,7 @@ else
glib_charsetaliasdir = glib_libdir
endif
glib_localstatedir = get_option('localstatedir')
if not glib_localstatedir.startswith('/')
# See https://mesonbuild.com/Builtin-options.html#directories
glib_localstatedir = join_paths(glib_prefix, glib_localstatedir)
endif
glib_localstatedir = glib_prefix / get_option('localstatedir')
installed_tests_metadir = join_paths(glib_datadir, 'installed-tests', meson.project_name())
installed_tests_execdir = join_paths(glib_libexecdir, 'installed-tests', meson.project_name())