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.
This commit is contained in:
Jan Tojnar 2020-04-29 07:42:38 +02:00 committed by WORLDofPEACE
parent c28e247e87
commit 24f9cc76c0

View File

@ -868,8 +868,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)