diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-08-25 20:42:19 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2020-09-02 17:06:02 +0000 |
commit | 0448884695b45d49e065aa4837db33fe2f06ba7e (patch) | |
tree | 741d693b998fc79f36616aca439c41e6a3afb244 | |
parent | 70d2207212e9ae6a2b5d345811acfbe441b6ec74 (diff) | |
download | meson-0448884695b45d49e065aa4837db33fe2f06ba7e.zip meson-0448884695b45d49e065aa4837db33fe2f06ba7e.tar.gz meson-0448884695b45d49e065aa4837db33fe2f06ba7e.tar.bz2 |
cmake: Don't link DEBUG to CRT when not building with MSVC
is_debug doesn't just control the CRT, it also controls the 'debug
configuration' which is unrelated to the CRT setting on non-MSVC.
Fixes https://github.com/mesonbuild/meson/issues/7631
-rw-r--r-- | mesonbuild/dependencies/base.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index 85fb167..24d035d 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -1450,10 +1450,12 @@ class CMakeDependency(ExternalDependency): cfgs = [x for x in tgt.properties['IMPORTED_CONFIGURATIONS'] if x] cfg = cfgs[0] - is_debug = self.env.coredata.get_builtin_option('buildtype') == 'debug' if 'b_vscrt' in self.env.coredata.base_options: + is_debug = self.env.coredata.get_builtin_option('buildtype') == 'debug' if self.env.coredata.base_options['b_vscrt'].value in ('mdd', 'mtd'): is_debug = True + else: + is_debug = self.env.coredata.get_builtin_option('debug') if is_debug: if 'DEBUG' in cfgs: cfg = 'DEBUG' |