From f0820ff2e2f2c77c3d3a6572cdf7518ec8a76ef0 Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Thu, 14 Apr 2016 11:46:57 +0200 Subject: Set QT_SELECT environment variable during scons build This enables building on Gentoo. Test-Information: A user successfully built with this patch and both Qt4 and Qt5 installed. Change-Id: I81ada408d34208bbba22d30de5f4ecd0060e223f diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot index 407573b..df15937 100644 --- a/BuildTools/SCons/SConscript.boot +++ b/BuildTools/SCons/SConscript.boot @@ -181,6 +181,13 @@ if env["PLATFORM"] == "darwin" and env["target"] == "native" : if platform.machine() == "x86_64" : env.Append(LINKFLAGS = ["-arch", "x86_64"]) +# Set QT_SELECT variable to enable building on systems that have Qt4 and Qt5 installed and use qtselect +if env["PLATFORM"] != "darwin" and env["PLATFORM"] != "win32" : + if env["qt5"] : + env["ENV"]["QT_SELECT"] = "qt5" + else: + env["ENV"]["QT_SELECT"] = "qt4" + # Check whether we are running inside scan-build, and override compiler if so if "CCC_ANALYZER_HTML" in os.environ : for key, value in os.environ.items() : -- cgit v0.10.2-6-g49f6