Commit 613519c3 authored by Tobias Hunger's avatar Tobias Hunger

QtSupport: Do not prepend QT_HOST_BINS to PATH

Do not unconditionally prepend QT_HOST_BINS to PATH as part of the Kit
setup.

Prepend this directory to PATH in the Qmake- and GenericBuildConfigurations
instead.

Task-number: QTCREATORBUG-18714
Change-Id: I1c1d1362105b82f9c369d989e90d4f7079c2c9a2
Reviewed-by: Eike Ziller's avatarEike Ziller <eike.ziller@qt.io>
parent 81321239
......@@ -37,6 +37,8 @@
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
#include <qtsupport/baseqtversion.h>
#include <qtsupport/qtkitinformation.h>
#include <utils/mimetypes/mimedatabase.h>
#include <utils/pathchooser.h>
......@@ -199,6 +201,9 @@ BuildConfiguration::BuildType GenericBuildConfiguration::buildType() const
void GenericBuildConfiguration::addToEnvironment(Utils::Environment &env) const
{
prependCompilerPathToEnvironment(env);
const QtSupport::BaseQtVersion *qt = QtSupport::QtKitInformation::qtVersion(target()->kit());
if (qt)
env.prependOrSetPath(qt->binPath().toString());
}
////////////////////////////////////////////////////////////////////////////////////
......
......@@ -759,6 +759,9 @@ BuildConfiguration::BuildType QmakeBuildConfiguration::buildType() const
void QmakeBuildConfiguration::addToEnvironment(Environment &env) const
{
prependCompilerPathToEnvironment(env);
const BaseQtVersion *qt = QtKitInformation::qtVersion(target()->kit());
if (qt)
env.prependOrSetPath(qt->binPath().toString());
}
QmakeBuildConfiguration::LastKitState::LastKitState() { }
......
......@@ -1313,7 +1313,6 @@ void BaseQtVersion::addToEnvironment(const Kit *k, Environment &env) const
{
Q_UNUSED(k);
env.set(QLatin1String("QTDIR"), QDir::toNativeSeparators(qmakeProperty("QT_HOST_DATA")));
env.prependOrSetPath(qmakeProperty("QT_HOST_BINS"));
}
// Some Qt versions may require environment settings for qmake to work
......
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