diff options
author | Philippe Payant <philippe@inrosoftware.com> | 2017-06-21 15:18:38 -0400 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-06-29 14:52:44 +0530 |
commit | d48f42ba99465b79e64cbb09f9f9a4462e0fd8c2 (patch) | |
tree | 29a071fd04f618c71b9b6a647440fb9b412c6a56 | |
parent | 4b84d136b9f0ae602fcd48105787939546ae4c37 (diff) | |
download | meson-d48f42ba99465b79e64cbb09f9f9a4462e0fd8c2.zip meson-d48f42ba99465b79e64cbb09f9f9a4462e0fd8c2.tar.gz meson-d48f42ba99465b79e64cbb09f9f9a4462e0fd8c2.tar.bz2 |
Select release or debug libraries for Qt, based on buildtype.
See: https://github.com/mesonbuild/meson/issues/1979
-rw-r--r-- | mesonbuild/dependencies/ui.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py index af515db..f1ee7a6 100644 --- a/mesonbuild/dependencies/ui.py +++ b/mesonbuild/dependencies/ui.py @@ -291,10 +291,12 @@ class QtBaseDependency(ExternalDependency): mincdir = os.path.join(incdir, 'Qt' + module) self.compile_args.append('-I' + mincdir) if for_windows(self.env.is_cross_build(), self.env): + is_debug = self.env.cmd_line_options.buildtype.startswith('debug') + dbg = 'd' if is_debug else '' if self.qtver == '4': - base_name = 'Qt' + module + '4' + base_name = 'Qt' + module + dbg + '4' else: - base_name = 'Qt5' + module + base_name = 'Qt5' + module + dbg libfile = os.path.join(libdir, base_name + '.lib') if not os.path.isfile(libfile): # MinGW can link directly to .dll |