[gtk/wip/jtojnar/join-paths] build: clean up .pc generation



commit 6d9db8610eff8c12d594d53b7813d9eea1247801
Author: Jan Tojnar <jtojnar gmail com>
Date:   Wed Apr 29 07:42:38 2020 +0200

    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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]