pkgconfig: set libdir only if used

This should address some concerns outlined in
https://github.com/yhirose/cpp-httplib/pull/1182
pull/9926/head
Andrea Pappacoda 3 years ago committed by Dylan Baker
parent 5d932f31b9
commit 248e6cf473
  1. 1
      mesonbuild/modules/pkgconfig.py

@ -347,6 +347,7 @@ class PkgConfigModule(ExtensionModule):
ofile.write('prefix={}\n'.format(self._escape(prefix))) ofile.write('prefix={}\n'.format(self._escape(prefix)))
if uninstalled: if uninstalled:
ofile.write('srcdir={}\n'.format(self._escape(srcdir))) ofile.write('srcdir={}\n'.format(self._escape(srcdir)))
if deps.pub_libs or deps.priv_libs:
ofile.write('libdir={}\n'.format(self._escape('${prefix}' / libdir))) ofile.write('libdir={}\n'.format(self._escape('${prefix}' / libdir)))
ofile.write('includedir={}\n'.format(self._escape('${prefix}' / incdir))) ofile.write('includedir={}\n'.format(self._escape('${prefix}' / incdir)))
if variables or unescaped_variables: if variables or unescaped_variables:

Loading…
Cancel
Save