diff options
author | Benjamin Redelings <benjamin.redelings@gmail.com> | 2017-12-25 21:30:16 -0800 |
---|---|---|
committer | Benjamin Redelings <benjamin.redelings@gmail.com> | 2018-01-01 22:42:49 -0800 |
commit | 4c7802b107d8fc09dda2e7846d8a6f653f1b11fb (patch) | |
tree | eab7c0e82b7e5641f91850940ab3b228bf5c6304 | |
parent | 71d24094cd1fb03a2acfc96bb5094539f185dff5 (diff) | |
download | meson-4c7802b107d8fc09dda2e7846d8a6f653f1b11fb.tar.gz |
Link against the library files that we found during module detection.
-rw-r--r-- | mesonbuild/dependencies/misc.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py index 6f6624aff..99c82e880 100644 --- a/mesonbuild/dependencies/misc.py +++ b/mesonbuild/dependencies/misc.py @@ -359,7 +359,9 @@ class BoostDependency(ExternalDependency): pass else: continue - self.lib_modules[self.modname_from_filename(entry)] = os.path.basename(entry) + modname = self.modname_from_filename(entry) + if modname not in self.lib_modules: + self.lib_modules[modname] = entry def get_win_link_args(self): args = [] @@ -379,14 +381,7 @@ class BoostDependency(ExternalDependency): elif self.libdir: args.append('-L' + self.libdir) for lib in self.requested_modules: - # The compiler's library detector is the most reliable so use that first. - boost_lib = 'boost_' + lib - default_detect = self.compiler.find_library(boost_lib, self.env, []) - if default_detect is not None: - args += default_detect - elif boost_lib in self.lib_modules: - linkcmd = '-l' + boost_lib - args.append(linkcmd) + args += [self.lib_modules['boost_' + lib]] return args def get_sources(self): |