Commit e9f7fb93 authored by Tobias Hunger's avatar Tobias Hunger

Allow qmake to work even if toolchain libraries are not static

Task-number: QTCREATORBUG-6576

Change-Id: I49f458181a3ba0697a096b2a6435838fbcdbc759
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 74a458bc
......@@ -1184,7 +1184,18 @@ bool BaseQtVersion::queryQMakeVariables(const Utils::FileName &binary, QHash<QSt
return false;
QProcess process;
Utils::Environment env = Utils::Environment::systemEnvironment();
#ifdef Q_OS_WIN
// Add tool chain environments. This is necessary for non-static qmakes e.g. using mingw on windows
QList<ProjectExplorer::ToolChain *> tcList = ProjectExplorer::ToolChainManager::instance()->toolChains();
foreach (ProjectExplorer::ToolChain *tc, tcList)
tc->addToEnvironment(env);
#endif
process.setEnvironment(env.toStringList());
process.start(qmake.absoluteFilePath(), QStringList(QLatin1String("-query")), QIODevice::ReadOnly);
if (!process.waitForStarted()) {
*qmakeIsExecutable = false;
qWarning("Cannot start '%s': %s", qPrintable(binary.toUserOutput()), qPrintable(process.errorString()));
......
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