forked from qt-creator/qt-creator
Utils: FilePathify Environment::{ap,pre}pendOrSetPath etc
Change-Id: Idfa5ec247337570936b0236cab9d3a5669792ca0 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -87,8 +87,7 @@ BuildDirParameters::BuildDirParameters(CMakeBuildConfiguration *bc)
|
||||
CMakeSpecificSettings *settings = CMakeProjectPlugin::projectTypeSpecificSettings();
|
||||
if (!settings->ninjaPath.filePath().isEmpty()) {
|
||||
const Utils::FilePath ninja = settings->ninjaPath.filePath();
|
||||
const Utils::FilePath ninjaDir = ninja.isFile() ? ninja.parentDir() : ninja;
|
||||
environment.appendOrSetPath(ninjaDir.path());
|
||||
environment.appendOrSetPath(ninja.isFile() ? ninja.parentDir() : ninja);
|
||||
}
|
||||
|
||||
cmakeToolId = CMakeKitAspect::cmakeToolId(k);
|
||||
|
||||
@@ -1022,10 +1022,8 @@ const QList<BuildTargetInfo> CMakeBuildSystem::appTargets() const
|
||||
|
||||
// Workaround for QTCREATORBUG-19354:
|
||||
bti.runEnvModifier = [this, buildKey](Environment &env, bool enabled) {
|
||||
if (enabled) {
|
||||
const Utils::FilePaths paths = librarySearchPaths(this, buildKey);
|
||||
env.prependOrSetLibrarySearchPaths(Utils::transform(paths, &FilePath::toString));
|
||||
}
|
||||
if (enabled)
|
||||
env.prependOrSetLibrarySearchPaths(librarySearchPaths(this, buildKey));
|
||||
};
|
||||
|
||||
appTargetList.append(bti);
|
||||
|
||||
@@ -848,8 +848,8 @@ void CMakeGeneratorKitAspect::addToBuildEnvironment(const Kit *k, Environment &e
|
||||
if (info.generator == "NMake Makefiles JOM") {
|
||||
if (env.searchInPath("jom.exe").exists())
|
||||
return;
|
||||
env.appendOrSetPath(Core::ICore::libexecPath().toUserOutput());
|
||||
env.appendOrSetPath(Core::ICore::libexecPath("jom").toUserOutput());
|
||||
env.appendOrSetPath(Core::ICore::libexecPath());
|
||||
env.appendOrSetPath(Core::ICore::libexecPath("jom"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user