aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/build.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-10-12 12:12:27 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-10-12 13:40:08 +0530
commitd819914af01f11cf3dfcc3cc7e7eaaf63f97ce6a (patch)
treecfea41c23821830e7c9b7aafc7270bbe9c0f6a5e /mesonbuild/build.py
parent3a3db9fc5ee543821d7384038b852538f84099f6 (diff)
downloadmeson-d819914af01f11cf3dfcc3cc7e7eaaf63f97ce6a.zip
meson-d819914af01f11cf3dfcc3cc7e7eaaf63f97ce6a.tar.gz
meson-d819914af01f11cf3dfcc3cc7e7eaaf63f97ce6a.tar.bz2
pkgconfig: Warn if library has name_prefix/suffix set
GCC/Clang won't be able to find it via an -lfoo flag, so the pkg-config file might be unusable. Fixes https://github.com/mesonbuild/meson/issues/889
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r--mesonbuild/build.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index f212fe4..4fc8536 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -229,6 +229,8 @@ class BuildTarget():
self.include_dirs = []
self.link_targets = []
self.link_depends = []
+ self.name_prefix_set = False
+ self.name_suffix_set = False
self.filename = 'no_name'
# The file with debugging symbols
self.debug_filename = None
@@ -514,6 +516,7 @@ class BuildTarget():
elif not isinstance(name_prefix, str):
raise InvalidArguments('name_prefix must be a string.')
self.prefix = name_prefix
+ self.name_prefix_set = True
if 'name_suffix' in kwargs:
name_suffix = kwargs['name_suffix']
if isinstance(name_suffix, list):
@@ -523,6 +526,7 @@ class BuildTarget():
if not isinstance(name_suffix, str):
raise InvalidArguments('name_suffix must be a string.')
self.suffix = name_suffix
+ self.name_suffix_set = True
if isinstance(self, StaticLibrary):
# You can't disable PIC on OS X. The compiler ignores -fno-PIC.
# PIC is always on for Windows (all code is position-independent