diff options
author | Guillaume Poirier-Morency <guillaumepoiriermorency@gmail.com> | 2016-10-21 15:48:22 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-10-23 04:38:34 -0700 |
commit | f7a60099f6c00d86eefdef13e154a4f57d4fcdaf (patch) | |
tree | 14a6965944108e2751b502e36733a0ef96edbc8e | |
parent | ed3cc537cb34b6ab054a67d86a5c96258e7650d2 (diff) | |
download | meson-f7a60099f6c00d86eefdef13e154a4f57d4fcdaf.zip meson-f7a60099f6c00d86eefdef13e154a4f57d4fcdaf.tar.gz meson-f7a60099f6c00d86eefdef13e154a4f57d4fcdaf.tar.bz2 |
pkgconfig: Fix absolute 'libdir' and 'includedir'
-rw-r--r-- | mesonbuild/modules/pkgconfig.py | 8 |
1 files changed, 4 insertions, 4 deletions
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) |