diff --git a/kiwixbuild/buildenv.py b/kiwixbuild/buildenv.py index c41d733..8348118 100644 --- a/kiwixbuild/buildenv.py +++ b/kiwixbuild/buildenv.py @@ -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): diff --git a/kiwixbuild/dependencies/base.py b/kiwixbuild/dependencies/base.py index bb8637d..4499929 100644 --- a/kiwixbuild/dependencies/base.py +++ b/kiwixbuild/dependencies/base.py @@ -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,