aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/qt.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/modules/qt.py')
-rw-r--r--mesonbuild/modules/qt.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/modules/qt.py b/mesonbuild/modules/qt.py
index 463bf01..54e2c73 100644
--- a/mesonbuild/modules/qt.py
+++ b/mesonbuild/modules/qt.py
@@ -49,7 +49,11 @@ class QtBaseModule:
# What kind of an idiot thought that was a good idea?
for compiler, compiler_name in ((self.moc, "Moc"), (self.uic, "Uic"), (self.rcc, "Rcc"), (self.lrelease, "lrelease")):
if compiler.found():
- stdout, stderr = Popen_safe(compiler.get_command() + ['-version'])[1:3]
+ # Workaround since there is no easy way to know which tool/version support which flag
+ for flag in ['-v', '-version']:
+ p, stdout, stderr = Popen_safe(compiler.get_command() + [flag])[0:3]
+ if p.returncode == 0:
+ break
stdout = stdout.strip()
stderr = stderr.strip()
if 'Qt {}'.format(self.qt_version) in stderr: