From 6d9db8610eff8c12d594d53b7813d9eea1247801 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 29 Apr 2020 07:42:38 +0200 Subject: [PATCH] build: clean up .pc generation Path concatenation is much nicer than the unwieldy format method. Since paths returned by get_option are relative to prefix, they will be joined as before. As a bonus, this fixes weird platforms like NixOS that actually pass absolute includedir under a different prefix. --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 12388f743a..fcd3fe2052 100644 --- a/meson.build +++ b/meson.build @@ -720,8 +720,8 @@ pkgconf = configuration_data() pkgconf.set('prefix', get_option('prefix')) pkgconf.set('exec_prefix', '${prefix}') -pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir'))) -pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir'))) +pkgconf.set('libdir', '${prefix}' / get_option('libdir')) +pkgconf.set('includedir', '${prefix}' / get_option('includedir')) pkgconf.set('GTK_API_VERSION', gtk_api_version) pkgconf.set('VERSION', meson.project_version()) pkgconf.set('GTK_BINARY_VERSION', gtk_binary_version)