aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGoncalo Carvalho <glslang@gmail.com>2017-10-23 17:20:39 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2017-10-29 02:13:54 +0300
commit01611a66e268a3cda7938fe99456ed78f83c73b2 (patch)
tree5363449e2eaa41b00d3315241f4f50bbe1c5f394
parent12df9c46f58747c79e8745a29befe570d47ef78a (diff)
downloadmeson-01611a66e268a3cda7938fe99456ed78f83c73b2.zip
meson-01611a66e268a3cda7938fe99456ed78f83c73b2.tar.gz
meson-01611a66e268a3cda7938fe99456ed78f83c73b2.tar.bz2
Fix boost link cmd line when compiler.find_library returns None, self.request_modules doesn't have 'boost_' prefix but lib_modules is keyed on 'boost_*'
-rw-r--r--mesonbuild/dependencies/misc.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py
index 81bcdcb..a24c873 100644
--- a/mesonbuild/dependencies/misc.py
+++ b/mesonbuild/dependencies/misc.py
@@ -359,11 +359,12 @@ class BoostDependency(ExternalDependency):
args.append('-L' + self.libdir)
for lib in self.requested_modules:
# The compiler's library detector is the most reliable so use that first.
- default_detect = self.compiler.find_library('boost_' + lib, self.env, [])
+ boost_lib = 'boost_' + lib
+ default_detect = self.compiler.find_library(boost_lib, self.env, [])
if default_detect is not None:
args += default_detect
- elif lib in self.lib_modules:
- linkcmd = '-l' + lib
+ elif boost_lib in self.lib_modules:
+ linkcmd = '-l' + boost_lib
args.append(linkcmd)
return args