From 674b520206422f546131aa5218d0b2ffddccbf37 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Wed, 12 Oct 2016 21:22:53 +0530 Subject: [PATCH] pkgconfig: Only warn for suffix if the filename doesn't start with lib --- mesonbuild/modules/pkgconfig.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py index d4309429e..daa11ea69 100644 --- a/mesonbuild/modules/pkgconfig.py +++ b/mesonbuild/modules/pkgconfig.py @@ -50,7 +50,11 @@ class PkgConfigModule: for l in libraries: if l.custom_install_dir: ofile.write('-L${prefix}/%s ' % l.custom_install_dir) - if l.name_prefix_set: + # Warn, but not if the filename starts with 'lib'. This can + # happen, for instance, if someone really wants to use the + # 'lib' prefix on all systems, not just on UNIX, or if the the + # target name itself starts with 'lib'. + if l.name_prefix_set and not l.filename.startswith('lib'): mlog.log(mlog.red('WARNING:'), msg.format(l.name, 'name_prefix', pcfile)) if l.name_suffix_set: mlog.log(mlog.red('WARNING:'), msg.format(l.name, 'name_suffix', pcfile))