forked from qt-creator/qt-creator
CMake: Fix handling of setting for Ninja path
When Ninja is installed via the installer, it writes the full path to the Ninja binary into the settings. Change-Id: I95a19c8c1afbf980c899fb1eeb8656e7e86ad4a2 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -64,8 +64,11 @@ BuildDirParameters::BuildDirParameters(CMakeBuildConfiguration *bc)
|
|||||||
environment.set("ICECC", "no");
|
environment.set("ICECC", "no");
|
||||||
|
|
||||||
CMakeSpecificSettings *settings = CMakeProjectPlugin::projectTypeSpecificSettings();
|
CMakeSpecificSettings *settings = CMakeProjectPlugin::projectTypeSpecificSettings();
|
||||||
if (!settings->ninjaPath().isEmpty())
|
if (!settings->ninjaPath().isEmpty()) {
|
||||||
environment.appendOrSetPath(settings->ninjaPath().toString());
|
const Utils::FilePath setting = settings->ninjaPath();
|
||||||
|
const Utils::FilePath path = setting.toFileInfo().isFile() ? setting.parentDir() : setting;
|
||||||
|
environment.appendOrSetPath(path.toString());
|
||||||
|
}
|
||||||
|
|
||||||
cmakeToolId = CMakeKitAspect::cmakeToolId(k);
|
cmakeToolId = CMakeKitAspect::cmakeToolId(k);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user