From 8506cdeffdf878552c354e9fac08dadde654bcd3 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Thu, 14 Jun 2018 16:16:56 +0200 Subject: [PATCH] Correctly pass CMAKE_* to qmake. qmake doesn't use the env variables, we must pass the variables in the command line. --- kiwixbuild/dependencies/base.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/kiwixbuild/dependencies/base.py b/kiwixbuild/dependencies/base.py index cd3453e..6897ad2 100644 --- a/kiwixbuild/dependencies/base.py +++ b/kiwixbuild/dependencies/base.py @@ -371,14 +371,26 @@ class CMakeBuilder(MakeBuilder): class QMakeBuilder(MakeBuilder): qmake_target = "" + + @property + def env_option(self): + options = "" + if 'QMAKE_CC' in os.environ: + options += 'QMAKE_CC={} '.format(os.environ['QMAKE_CC']) + if 'QMAKE_CXX' in os.environ: + options += 'QMAKE_CXX={} '.format(os.environ['QMAKE_CXX']) + return options + def _configure(self, context): context.try_skip(self.build_path) cross_option = "" command = ("qmake {configure_option}" + " {env_option}" " {source_path}" " {cross_option}") command = command.format( configure_option=self.configure_option, + env_option=self.env_option, source_path=self.source_path, cross_option=cross_option )