Commit d88faf03 authored by Yuchen Deng's avatar Yuchen Deng Committed by Tobias Hunger

Fix detection of Microsoft SDKs

Change-Id: I44401c859279978ad13df52b589f29a39cc53042
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent a450c133
......@@ -546,21 +546,24 @@ QList<ToolChain *> MsvcToolChainFactory::autoDetect()
if (folder.isEmpty())
continue;
const QString sdkVcVarsBat = folder + QLatin1String("bin\\SetEnv.cmd");
if (!QFileInfo(sdkVcVarsBat).exists())
QDir dir(folder);
if (!dir.cd(QLatin1String("bin")))
continue;
QFileInfo fi(dir, QLatin1String("SetEnv.cmd"));
if (!fi.exists())
continue;
QList<ToolChain *> tmp;
QList<ToolChain *> tmp;
tmp.append(new MsvcToolChain(generateDisplayName(name, MsvcToolChain::WindowsSDK, MsvcToolChain::s32),
findAbiOfMsvc(MsvcToolChain::WindowsSDK, MsvcToolChain::s32, version),
sdkVcVarsBat, QLatin1String("/x86"), true));
fi.absoluteFilePath(), QLatin1String("/x86"), true));
// Add all platforms
tmp.append(new MsvcToolChain(generateDisplayName(name, MsvcToolChain::WindowsSDK, MsvcToolChain::s64),
findAbiOfMsvc(MsvcToolChain::WindowsSDK, MsvcToolChain::s64, version),
sdkVcVarsBat, QLatin1String("/x64"), true));
fi.absoluteFilePath(), QLatin1String("/x64"), true));
tmp.append(new MsvcToolChain(generateDisplayName(name, MsvcToolChain::WindowsSDK, MsvcToolChain::ia64),
findAbiOfMsvc(MsvcToolChain::WindowsSDK, MsvcToolChain::ia64, version),
sdkVcVarsBat, QLatin1String("/ia64"), true));
fi.absoluteFilePath(), QLatin1String("/ia64"), true));
// Make sure the default is front.
if (folder == defaultSdkPath)
results = tmp + results;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment