From f7a60099f6c00d86eefdef13e154a4f57d4fcdaf Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Fri, 21 Oct 2016 15:48:22 -0400 Subject: pkgconfig: Fix absolute 'libdir' and 'includedir' --- mesonbuild/modules/pkgconfig.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mesonbuild/modules/pkgconfig.py') diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py index 0cfd309..7556375 100644 --- a/mesonbuild/modules/pkgconfig.py +++ b/mesonbuild/modules/pkgconfig.py @@ -45,10 +45,10 @@ class PkgConfigModule: fname = os.path.join(outdir, pcfile) with open(fname, 'w') as ofile: ofile.write('prefix=%s\n' % coredata.get_builtin_option('prefix')) - ofile.write('libdir=${prefix}/%s\n' % - coredata.get_builtin_option('libdir')) - ofile.write('includedir=${prefix}/%s\n\n' % - coredata.get_builtin_option('includedir')) + # '${prefix}' is ignored if the second path is absolute (see + # 'os.path.join' for details) + ofile.write('libdir=%s\n' % os.path.join('${prefix}', coredata.get_builtin_option('libdir'))) + ofile.write('includedir=%s\n' % os.path.join('${prefix}', coredata.get_builtin_option('includedir'))) ofile.write('Name: %s\n' % name) if len(description) > 0: ofile.write('Description: %s\n' % description) -- cgit v1.1