diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py index 968e1eede..a863b33c9 100644 --- a/mesonbuild/modules/pkgconfig.py +++ b/mesonbuild/modules/pkgconfig.py @@ -329,18 +329,17 @@ class PkgConfigModule(ExtensionModule): else: outdir = state.environment.scratch_dir prefix = PurePath(coredata.get_builtin_option('prefix')) - # These always return paths relative to prefix - libdir = PurePath(coredata.get_builtin_option('libdir')) - incdir = PurePath(coredata.get_builtin_option('includedir')) + # These always return paths relative to prefix + libdir = PurePath(coredata.get_builtin_option('libdir')) + incdir = PurePath(coredata.get_builtin_option('includedir')) fname = os.path.join(outdir, pcfile) with open(fname, 'w', encoding='utf-8') as ofile: if not dataonly: ofile.write('prefix={}\n'.format(self._escape(prefix))) if uninstalled: ofile.write('srcdir={}\n'.format(self._escape(srcdir))) - else: - ofile.write('libdir={}\n'.format(self._escape('${prefix}' / libdir))) - ofile.write('includedir={}\n'.format(self._escape('${prefix}' / incdir))) + ofile.write('libdir={}\n'.format(self._escape('${prefix}' / libdir))) + ofile.write('includedir={}\n'.format(self._escape('${prefix}' / incdir))) if variables: ofile.write('\n') for k, v in variables: