aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-10-12 21:22:53 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-10-12 21:22:54 +0530
commit674b520206422f546131aa5218d0b2ffddccbf37 (patch)
tree17bee8f8568f7f06fb6ac7d0e18e8c9bc3f98b87
parentd819914af01f11cf3dfcc3cc7e7eaaf63f97ce6a (diff)
downloadmeson-674b520206422f546131aa5218d0b2ffddccbf37.zip
meson-674b520206422f546131aa5218d0b2ffddccbf37.tar.gz
meson-674b520206422f546131aa5218d0b2ffddccbf37.tar.bz2
pkgconfig: Only warn for suffix if the filename doesn't start with lib
-rw-r--r--mesonbuild/modules/pkgconfig.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py
index d430942..daa11ea 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))