CMake: Use local builddir path when constructing cmakeCommand

The command will be executed on the build device, from that perspective
the builddir is local.

Change-Id: I9b3bdf0333f2634caff352e8738019a86c09870c
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2021-06-03 07:57:40 +02:00
parent 953689ec63
commit d632b3eb4f

View File

@@ -378,10 +378,10 @@ CommandLine CMakeBuildStep::cmakeCommand() const
{
CMakeTool *tool = CMakeKitAspect::cmakeTool(kit());
Utils::CommandLine cmd(tool ? tool->cmakeExecutable() : Utils::FilePath(), {});
CommandLine cmd(tool ? tool->cmakeExecutable() : FilePath(), {});
QString buildDirectory = ".";
if (buildConfiguration())
buildDirectory = buildConfiguration()->buildDirectory().toString();
buildDirectory = buildConfiguration()->buildDirectory().path();
cmd.addArgs({"--build", buildDirectory});
cmd.addArg("--target");