Verified Commit 228d81a2 authored by Jan Tojnar's avatar Jan Tojnar
Browse files

build: Include prefix in libdir & co.

Previously, when absolute `libdir` path was needed, it was joined
with `prefix` on the spot. This meant the libraries used relative
`install_dir` when `libdir` option was not passed. This in turn
caused issues for NixOS’s patched Meson which needs absolute paths
to be able to use them in generated GIR files.

This commit initializes `bindir`, `libdir`, and `datadir` with
`prefix` in the top-level meson.build.
parent a27df7e4
Pipeline #756 passed with stage
in 3 minutes and 21 seconds
......@@ -20,7 +20,7 @@ if (desktop_file_validate.found())
endif
service_conf = configuration_data()
service_conf.set('bindir', join_paths(prefix, bindir))
service_conf.set('bindir', bindir)
services = [
'org.freedesktop.Telepathy.Client.Polari.service',
......
......@@ -11,9 +11,9 @@ i18n = import('i18n')
prefix = get_option('prefix')
bindir = get_option('bindir')
libdir = get_option('libdir')
datadir = get_option('datadir')
bindir = join_paths(prefix, get_option('bindir'))
libdir = join_paths(prefix, get_option('libdir'))
datadir = join_paths(prefix, get_option('datadir'))
pkglibdir = join_paths(libdir, meson.project_name())
pkgdatadir = join_paths(datadir, meson.project_name())
......
......@@ -73,8 +73,8 @@ exeargs = [
'-DPACKAGE_NAME="polari"',
'-DPACKAGE_VERSION="@0@"'.format(meson.project_version()),
'-DPREFIX="@0@"'.format(prefix),
'-DLIBDIR="@0@"'.format(join_paths(prefix, libdir)),
'-DPKGLIBDIR="@0@"'.format(join_paths(prefix, pkglibdir))
'-DLIBDIR="@0@"'.format(libdir),
'-DPKGLIBDIR="@0@"'.format(pkglibdir)
]
polari = executable('polari', ['polari.c', src_resources, data_resources],
dependencies: [gio, girepository, gjs],
......
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