meson: fix pkgconfig file

Fix includedir and libdir to have proper paths (not just relative ones
to prefix).

Using Meson's native pkgconfig module is the best way of doing this.

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2026-07-24 07:37:41 +01:00
parent 7ee487cc61
commit 2419dbd2ea
+5 -13
View File
@@ -297,19 +297,11 @@ endif
install_headers(installed_headers, subdir: 'json-c')
# pkg-config file
configure_file(
input: 'json-c.pc.in',
output: 'json-c.pc',
install: true,
install_dir: get_option('libdir') / 'pkgconfig',
configuration: {
'prefix': get_option('prefix'),
'exec_prefix': get_option('prefix'),
'libdir': get_option('libdir'),
'includedir': get_option('includedir'),
'VERSION': meson.project_version(),
'LIBS': '',
}
pkg = import('pkgconfig')
pkg.generate(
libjson,
description: 'A JSON implementation in C',
subdirs: 'json-c',
)
# Optional apps