ProjectExplorer: Use FilePath in installRoot machinery

Helps to get path delimiters right.

Change-Id: Ifaab593a530c667488b7b5e6546041d8c212ece8
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
hjk
2022-06-10 15:23:22 +02:00
parent eb886ad40b
commit e2e5d67bc3
9 changed files with 22 additions and 22 deletions

View File

@@ -117,7 +117,7 @@ ProjectExplorer::DeploymentKnowledge CMakeProject::deploymentKnowledge() const
}
MakeInstallCommand CMakeProject::makeInstallCommand(const Target *target,
const QString &installRoot)
const FilePath &installRoot)
{
MakeInstallCommand cmd;
if (const BuildConfiguration * const bc = target->activeBuildConfiguration()) {
@@ -131,12 +131,12 @@ MakeInstallCommand CMakeProject::makeInstallCommand(const Target *target,
QStringList config;
auto bs = qobject_cast<CMakeBuildSystem*>(target->buildSystem());
if (bs) {
if (bs->usesAllCapsTargets())
installTarget = "INSTALL";
if (bs->isMultiConfigReader())
config << "--config" << bs->cmakeBuildType();
}
QTC_ASSERT(bs, return {});
if (bs->usesAllCapsTargets())
installTarget = "INSTALL";
if (bs->isMultiConfigReader())
config << "--config" << bs->cmakeBuildType();
FilePath buildDirectory = ".";
if (auto bc = bs->buildConfiguration())
@@ -148,7 +148,7 @@ MakeInstallCommand CMakeProject::makeInstallCommand(const Target *target,
cmd.command.addArg(installTarget);
cmd.command.addArgs(config);
cmd.environment.set("DESTDIR", QDir::toNativeSeparators(installRoot));
cmd.environment.set("DESTDIR", installRoot.nativePath());
return cmd;
}