pkgconfig: Define libdir and includedir in -uninstalled.pc files

This fixes glib-2.0-uninstalled.pc file.
GLib does `extra_cflags : ['-I${libdir}/glib-2.0/include']` because some
of its headers gets installed there. But when used uninstalled that path
makes no sense and pkg-config aborts because ${libdir} is not defined.
This cannot be worked around by GLib because Meson does not allow
setting different `extra_cflags` for -uninstalled.pc, and does not allow
setting libdir in `uninstalled_variables`.
pull/7881/head
Xavier Claessens 4 years ago committed by Jussi Pakkanen
parent bf5bcad05f
commit 14fd1a329a
  1. 1
      mesonbuild/modules/pkgconfig.py

@ -338,7 +338,6 @@ class PkgConfigModule(ExtensionModule):
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)))
if variables:

Loading…
Cancel
Save