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') install_headers(installed_headers, subdir: 'json-c')
# pkg-config file # pkg-config file
configure_file( pkg = import('pkgconfig')
input: 'json-c.pc.in', pkg.generate(
output: 'json-c.pc', libjson,
install: true, description: 'A JSON implementation in C',
install_dir: get_option('libdir') / 'pkgconfig', subdirs: 'json-c',
configuration: {
'prefix': get_option('prefix'),
'exec_prefix': get_option('prefix'),
'libdir': get_option('libdir'),
'includedir': get_option('includedir'),
'VERSION': meson.project_version(),
'LIBS': '',
}
) )
# Optional apps # Optional apps