pkgconfig: Fix absolute 'libdir' and 'includedir'

pull/918/head
Guillaume Poirier-Morency 8 years ago committed by Jussi Pakkanen
parent ed3cc537cb
commit f7a60099f6
  1. 8
      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)

Loading…
Cancel
Save