summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-04-14 09:46:57 (GMT)
committerKevin Smith <git@kismith.co.uk>2016-07-05 15:03:15 (GMT)
commit3fd85077d90e46b1dd8ea971bc1c9eeb3e56ff14 (patch)
tree1214904c0b83ab13238ba9bba73a50ee83f5a129 /BuildTools/SCons
parent14ddf8b470f5a3420b5f2c96daea33c2513cac6e (diff)
downloadswift-3fd85077d90e46b1dd8ea971bc1c9eeb3e56ff14.zip
swift-3fd85077d90e46b1dd8ea971bc1c9eeb3e56ff14.tar.bz2
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
Diffstat (limited to 'BuildTools/SCons')
-rw-r--r--BuildTools/SCons/SConscript.boot7
1 files changed, 7 insertions, 0 deletions
diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot
index 3e8ab96..14f72c7 100644
--- a/BuildTools/SCons/SConscript.boot
+++ b/BuildTools/SCons/SConscript.boot
@@ -182,6 +182,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() :