Correctly detect qmake command.
qmake may be named qmake-qt5 on some distribution.
This commit is contained in:
parent
0e6ed1384c
commit
c7ea2a31cb
|
@ -26,7 +26,10 @@ class PlatformNeutralEnv:
|
|||
sys.exit("ERROR: ninja command not found.")
|
||||
self.meson_command = self._detect_meson()
|
||||
if not self.meson_command:
|
||||
sys.exit("ERROR: meson command not found")
|
||||
sys.exit("ERROR: meson command not found.")
|
||||
self.qmake_command = self._detect_qmake()
|
||||
if not self.qmake_command:
|
||||
print("WARNING: qmake command not found.", file=sys.stderr)
|
||||
self.mesontest_command = "{} test".format(self.meson_command)
|
||||
|
||||
def detect_platform(self):
|
||||
|
@ -65,6 +68,9 @@ class PlatformNeutralEnv:
|
|||
def _detect_meson(self):
|
||||
return self._detect_binary('meson.py', 'meson')
|
||||
|
||||
def _detect_qmake(self):
|
||||
return self._detect_binary('qmake-qt5', 'qmake')
|
||||
|
||||
|
||||
class BuildEnv:
|
||||
def __init__(self, platformInfo):
|
||||
|
|
|
@ -448,11 +448,12 @@ class QMakeBuilder(MakeBuilder):
|
|||
def _configure(self, context):
|
||||
context.try_skip(self.build_path)
|
||||
cross_option = ""
|
||||
command = ("qmake {configure_option}"
|
||||
command = ("{command} {configure_option}"
|
||||
" {env_option}"
|
||||
" {source_path}"
|
||||
" {cross_option}")
|
||||
command = command.format(
|
||||
command = neutralEnv('qmake_command'),
|
||||
configure_option=self.configure_option,
|
||||
env_option=self.env_option,
|
||||
source_path=self.source_path,
|
||||
|
|
Loading…
Reference in New Issue