diff options
author | Benjamin Redelings <benjamin.redelings@gmail.com> | 2018-02-07 22:05:31 -0500 |
---|---|---|
committer | Benjamin Redelings <benjamin.redelings@gmail.com> | 2018-02-07 22:05:31 -0500 |
commit | 4babf035e5125bdf48ea5293f53e7d3c0b41a621 (patch) | |
tree | 719762ae026008999dfc4c6aea22200ba74f3782 /mesonbuild/dependencies | |
parent | 47ced35b77c474a7ccf9518c99f52d8b85bc1d01 (diff) | |
download | meson-4babf035e5125bdf48ea5293f53e7d3c0b41a621.zip meson-4babf035e5125bdf48ea5293f53e7d3c0b41a621.tar.gz meson-4babf035e5125bdf48ea5293f53e7d3c0b41a621.tar.bz2 |
Factor our sourceforge dir names, and don't crash on non-msvc.
Diffstat (limited to 'mesonbuild/dependencies')
-rw-r--r-- | mesonbuild/dependencies/misc.py | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py index e720ec5..2a141ad 100644 --- a/mesonbuild/dependencies/misc.py +++ b/mesonbuild/dependencies/misc.py @@ -348,20 +348,24 @@ class BoostDependency(ExternalDependency): tag = self.threading_tag() return tag - def detect_lib_modules_win(self): - arch = detect_cpu_family(self.env.coredata.compilers) + def sourceforge_dir(self): + if self.env.detect_cpp_compiler(self.want_cross).get_id() != 'msvc': + return None comp_ts_version = self.env.detect_cpp_compiler(self.want_cross).get_toolset_version() - compiler_ts = comp_ts_version.split('.') - compiler = 'vc{}{}'.format(compiler_ts[0], compiler_ts[1]) + arch = detect_cpu_family(self.env.coredata.compilers) + if arch == 'x86': + return 'lib32-msvc-{}'.format(comp_ts_version) + elif arch == 'x86_64': + return 'lib64-msvc-{}'.format(comp_ts_version) + else: + # Does anyone do Boost cross-compiling to other archs on Windows? + return None + + def detect_lib_modules_win(self): if not self.libdir: # The libdirs in the distributed binaries (from sf) - if arch == 'x86': - lib_sf = 'lib32-msvc-{}'.format(comp_ts_version) - elif arch == 'x86_64': - lib_sf = 'lib64-msvc-{}'.format(comp_ts_version) - else: - # Does anyone do Boost cross-compiling to other archs on Windows? - lib_sf = None + lib_sf = self.sourceforge_dir() + if self.boost_root: roots = [self.boost_root] else: |