diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2020-01-17 00:53:17 +0000 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2020-01-17 15:44:35 +0000 |
commit | 65cb6852aedc355a00a9de00ef39372c985608c3 (patch) | |
tree | 985c51d91f72785e188f76157f3740a2e676c7b4 /mesonbuild/dependencies/ui.py | |
parent | 64432e94481dbd55bedf92f21610bc5ed6b52655 (diff) | |
download | meson-65cb6852aedc355a00a9de00ef39372c985608c3.zip meson-65cb6852aedc355a00a9de00ef39372c985608c3.tar.gz meson-65cb6852aedc355a00a9de00ef39372c985608c3.tar.bz2 |
Fix dependency('qt') crash with old Qt on OSX
Don't fail with 'KeyError: QMAKE_XSPEC' if `qmake -query` doesn't report
QMAKE_XSPEC. (Seen with 4.8.7)
Diffstat (limited to 'mesonbuild/dependencies/ui.py')
-rw-r--r-- | mesonbuild/dependencies/ui.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py index bdcc4a7..da411ef 100644 --- a/mesonbuild/dependencies/ui.py +++ b/mesonbuild/dependencies/ui.py @@ -373,7 +373,8 @@ class QtBaseDependency(ExternalDependency): (k, v) = tuple(line.split(':', 1)) qvars[k] = v # Qt on macOS uses a framework, but Qt for iOS/tvOS does not - if self.env.machines.host.is_darwin() and 'ios' not in qvars['QMAKE_XSPEC'] and 'tvos' not in qvars['QMAKE_XSPEC']: + xspec = qvars.get('QMAKE_XSPEC', '') + if self.env.machines.host.is_darwin() and not any(s in xspec for s in ['ios', 'tvos']): mlog.debug("Building for macOS, looking for framework") self._framework_detect(qvars, mods, kwargs) return qmake |