Honor the value of the PlatformToolset environment variable.

The Windows SDK 7.1 command prompt sets this value to "WindowsSDK7.1"
through its SetEnv.cmd batch script. The MSVC Express Editions do not
include a 64bit compiler toolchain, but the Windows SDK does, so this
change makes it easier to build qmake projects for x86_64 when using
the Express Editions, by running qmake from the SDK command prompt.
See also:
  http://msdn.microsoft.com/en-us/library/9yb4317s%28v=vs.100%29.aspx
  http://msdn.microsoft.com/en-us/library/ff660764%28v=vs.100%29.aspx

Task-number: QTBUG-31185
Change-Id: I49d3e159ed67f64490a3d57c5471d540d76ae13f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
Mat Sutcliffe 2014-02-03 20:33:48 +00:00 committed by The Qt Project
parent 5119bbc642
commit 0de55b6c9f

View File

@ -2195,6 +2195,16 @@ QString VCXProjectWriter::generateCondition(const VCConfiguration &config)
QString VCXProjectWriter::platformToolSetVersion(const DotNET version, bool winphoneBuild)
{
// The PlatformToolset string corresponds to the name of a directory in
// $(VCTargetsPath)\Platforms\{Win32,x64,...}\PlatformToolsets
// e.g. v90, v100, v110, v110_xp, v120_CTP_Nov, v120, or WindowsSDK7.1
// This environment variable may be set by a commandline build
// environment such as the Windows SDK command prompt
QByteArray envVar = qgetenv("PlatformToolset");
if (!envVar.isEmpty())
return envVar;
switch (version)
{
case NET2012: