From 09fb8d403b289134d686d096892111322391c010 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 30 Sep 2022 18:13:32 +0200 Subject: [PATCH] CMake: Use correct device environment for remote cmake binaries Change-Id: Id2fccab7f2d051406b0f2b0bbf3c118198f6ed32 Reviewed-by: Cristian Adam Reviewed-by: --- src/plugins/cmakeprojectmanager/cmaketool.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmaketool.cpp b/src/plugins/cmakeprojectmanager/cmaketool.cpp index 84908df7d05..4cef534ff1d 100644 --- a/src/plugins/cmakeprojectmanager/cmaketool.cpp +++ b/src/plugins/cmakeprojectmanager/cmaketool.cpp @@ -173,13 +173,14 @@ bool CMakeTool::isValid() const void CMakeTool::runCMake(QtcProcess &cmake, const QStringList &args, int timeoutS) const { + const FilePath executable = cmakeExecutable(); cmake.setTimeoutS(timeoutS); cmake.setDisableUnixTerminal(); - Environment env = Environment::systemEnvironment(); + Environment env = executable.deviceEnvironment(); env.setupEnglishOutput(); cmake.setEnvironment(env); cmake.setTimeOutMessageBoxEnabled(false); - cmake.setCommand({cmakeExecutable(), args}); + cmake.setCommand({executable, args}); cmake.runBlocking(); }