forked from qt-creator/qt-creator
ProjectExplorer: Use CommandLine in MakeInstallCommand
Instead a FilePath/QStringList pair. Change-Id: I55340795266699e448ec1e17681a5e788eaae37a Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -123,7 +123,7 @@ MakeInstallCommand CMakeProject::makeInstallCommand(const Target *target,
|
||||
if (const BuildConfiguration * const bc = target->activeBuildConfiguration()) {
|
||||
if (const auto cmakeStep = bc->buildSteps()->firstOfType<CMakeBuildStep>()) {
|
||||
if (CMakeTool *tool = CMakeKitAspect::cmakeTool(target->kit()))
|
||||
cmd.command = tool->cmakeExecutable();
|
||||
cmd.command.setExecutable(tool->cmakeExecutable());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,8 +142,11 @@ MakeInstallCommand CMakeProject::makeInstallCommand(const Target *target,
|
||||
if (auto bc = bs->buildConfiguration())
|
||||
buildDirectory = bc->buildDirectory();
|
||||
|
||||
cmd.arguments << "--build" << buildDirectory.onDevice(cmd.command).path()
|
||||
<< "--target" << installTarget << config;
|
||||
cmd.command.addArg("--build");
|
||||
cmd.command.addArg(buildDirectory.onDevice(cmd.command.executable()).path());
|
||||
cmd.command.addArg("--target");
|
||||
cmd.command.addArg(installTarget);
|
||||
cmd.command.addArgs(config);
|
||||
|
||||
cmd.environment.set("DESTDIR", QDir::toNativeSeparators(installRoot));
|
||||
return cmd;
|
||||
|
||||
Reference in New Issue
Block a user