aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/ui.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2019-01-05 21:44:31 +0200
committerGitHub <noreply@github.com>2019-01-05 21:44:31 +0200
commit1aca899a63ef287c6fb06e5383f6355b5e75d6d2 (patch)
treec0a77585ae3dbb716b5b51557486ffc25ef4dadf /mesonbuild/dependencies/ui.py
parent26437f0297bd9dcf4411d4591679724d59e1c312 (diff)
parente147054d6f8b78b306125fd785603ca0519fdfc1 (diff)
downloadmeson-1aca899a63ef287c6fb06e5383f6355b5e75d6d2.zip
meson-1aca899a63ef287c6fb06e5383f6355b5e75d6d2.tar.gz
meson-1aca899a63ef287c6fb06e5383f6355b5e75d6d2.tar.bz2
Merge pull request #4445 from Ericson2314/no-cross_info
Parsing of cross file upfront, and store in cross-agnostic data structures
Diffstat (limited to 'mesonbuild/dependencies/ui.py')
-rw-r--r--mesonbuild/dependencies/ui.py24
1 files changed, 10 insertions, 14 deletions
diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py
index 7b3d051..03c96f2 100644
--- a/mesonbuild/dependencies/ui.py
+++ b/mesonbuild/dependencies/ui.py
@@ -333,22 +333,18 @@ class QtBaseDependency(ExternalDependency):
if prefix:
self.bindir = os.path.join(prefix, 'bin')
- def _find_qmake(self, qmake):
- # Even when cross-compiling, if a cross-info qmake is not specified, we
- # fallback to using the qmake in PATH because that's what we used to do
- if self.env.is_cross_build():
- if 'qmake' in self.env.cross_info.config['binaries']:
- return ExternalProgram.from_bin_list(self.env.cross_info.config['binaries'], 'qmake')
- elif self.env.config_info:
- # Prefer suffixed to unsuffixed version
- p = ExternalProgram.from_bin_list(self.env.config_info.binaries, 'qmake')
- if p.found():
- return p
- return ExternalProgram(qmake, silent=True)
-
def _qmake_detect(self, mods, kwargs):
for qmake in ('qmake-' + self.name, 'qmake'):
- self.qmake = self._find_qmake(qmake)
+ self.qmake = ExternalProgram.from_bin_list(
+ self.env.binaries.host, qmake)
+ if not self.qmake.found():
+ # Even when cross-compiling, if a cross-info qmake is not
+ # specified, we fallback to using the qmake in PATH because
+ # that's what we used to do
+ self.qmake = ExternalProgram.from_bin_list(
+ self.env.binaries.build, qmake)
+ if not self.qmake.found():
+ self.qmake = ExternalProgram(qmake, silent=True)
if not self.qmake.found():
continue
# Check that the qmake is for qt5