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.")
|
sys.exit("ERROR: ninja command not found.")
|
||||||
self.meson_command = self._detect_meson()
|
self.meson_command = self._detect_meson()
|
||||||
if not self.meson_command:
|
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)
|
self.mesontest_command = "{} test".format(self.meson_command)
|
||||||
|
|
||||||
def detect_platform(self):
|
def detect_platform(self):
|
||||||
|
@ -65,6 +68,9 @@ class PlatformNeutralEnv:
|
||||||
def _detect_meson(self):
|
def _detect_meson(self):
|
||||||
return self._detect_binary('meson.py', 'meson')
|
return self._detect_binary('meson.py', 'meson')
|
||||||
|
|
||||||
|
def _detect_qmake(self):
|
||||||
|
return self._detect_binary('qmake-qt5', 'qmake')
|
||||||
|
|
||||||
|
|
||||||
class BuildEnv:
|
class BuildEnv:
|
||||||
def __init__(self, platformInfo):
|
def __init__(self, platformInfo):
|
||||||
|
|
|
@ -448,11 +448,12 @@ class QMakeBuilder(MakeBuilder):
|
||||||
def _configure(self, context):
|
def _configure(self, context):
|
||||||
context.try_skip(self.build_path)
|
context.try_skip(self.build_path)
|
||||||
cross_option = ""
|
cross_option = ""
|
||||||
command = ("qmake {configure_option}"
|
command = ("{command} {configure_option}"
|
||||||
" {env_option}"
|
" {env_option}"
|
||||||
" {source_path}"
|
" {source_path}"
|
||||||
" {cross_option}")
|
" {cross_option}")
|
||||||
command = command.format(
|
command = command.format(
|
||||||
|
command = neutralEnv('qmake_command'),
|
||||||
configure_option=self.configure_option,
|
configure_option=self.configure_option,
|
||||||
env_option=self.env_option,
|
env_option=self.env_option,
|
||||||
source_path=self.source_path,
|
source_path=self.source_path,
|
||||||
|
|
Loading…
Reference in New Issue