diff options
author | Alexis Jeandet <alexis.jeandet@member.fsf.org> | 2017-11-22 23:28:32 +0100 |
---|---|---|
committer | Alexis Jeandet <alexis.jeandet@member.fsf.org> | 2017-11-22 23:28:32 +0100 |
commit | 1fd743e6adbb04fc0d75ac21908a108c3483dc80 (patch) | |
tree | 98bc92dbd18383c0ded7e90e2c2f0471227611b4 | |
parent | 5de5e7673f48bd1d11f68c3c1cb69041f27d8d22 (diff) | |
download | meson-1fd743e6adbb04fc0d75ac21908a108c3483dc80.zip meson-1fd743e6adbb04fc0d75ac21908a108c3483dc80.tar.gz meson-1fd743e6adbb04fc0d75ac21908a108c3483dc80.tar.bz2 |
[Qt module] Added lrelease detection
Just detect lrelease as done with other Qt tools.
Uses -version instead of -v to probe version since lrelease don't
support it.
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
-rw-r--r-- | mesonbuild/dependencies/ui.py | 4 | ||||
-rw-r--r-- | mesonbuild/modules/qt.py | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py index 3412dc6..837149c 100644 --- a/mesonbuild/dependencies/ui.py +++ b/mesonbuild/dependencies/ui.py @@ -207,13 +207,15 @@ class QtBaseDependency(ExternalDependency): moc = ExternalProgram(os.path.join(self.bindir, 'moc'), silent=True) uic = ExternalProgram(os.path.join(self.bindir, 'uic'), silent=True) rcc = ExternalProgram(os.path.join(self.bindir, 'rcc'), silent=True) + lrelease = ExternalProgram(os.path.join(self.bindir, 'lrelease'), silent=True) else: # We don't accept unsuffixed 'moc', 'uic', and 'rcc' because they # are sometimes older, or newer versions. moc = ExternalProgram('moc-' + self.name, silent=True) uic = ExternalProgram('uic-' + self.name, silent=True) rcc = ExternalProgram('rcc-' + self.name, silent=True) - return moc, uic, rcc + lrelease = ExternalProgram('lrelease-' + self.name, silent=True) + return moc, uic, rcc, lrelease def _pkgconfig_detect(self, mods, kwargs): # We set the value of required to False so that we can try the diff --git a/mesonbuild/modules/qt.py b/mesonbuild/modules/qt.py index df6a631..c07a361 100644 --- a/mesonbuild/modules/qt.py +++ b/mesonbuild/modules/qt.py @@ -43,13 +43,13 @@ class QtBaseModule: kwargs = {'required': 'true', 'modules': 'Core', 'silent': 'true', 'method': method} qt = _QT_DEPS_LUT[self.qt_version](env, kwargs) # Get all tools and then make sure that they are the right version - self.moc, self.uic, self.rcc = qt.compilers_detect() + self.moc, self.uic, self.rcc, self.lrelease = qt.compilers_detect() # Moc, uic and rcc write their version strings to stderr. # Moc and rcc return a non-zero result when doing so. # 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")): + 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() + ['-v'])[1:3] + stdout, stderr = Popen_safe(compiler.get_command() + ['-version'])[1:3] stdout = stdout.strip() stderr = stderr.strip() if 'Qt {}'.format(self.qt_version) in stderr: |