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:
hjk
2022-06-10 14:57:28 +02:00
parent fc636755af
commit eb886ad40b
4 changed files with 15 additions and 11 deletions

View File

@@ -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;