Look for jom also in "jom" subdirectory

Jom is currently installed into the Qt Creator bin/ directory directly,
but it can be considered unsafe if we add that to the PATH. Look in a
subdirectory for it as well, as preparation for moving it there instead.

Task-number: QTCREATORBUG-25585
Change-Id: I85b379fa093c57639875872868c16b5cc964f4aa
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Eike Ziller
2021-04-23 11:59:23 +02:00
parent b264770e17
commit 86f0d72b2a
2 changed files with 6 additions and 3 deletions

View File

@@ -33,6 +33,8 @@
#include <app/app_version.h>
#include <coreplugin/icore.h>
#include <ios/iosconstants.h>
#include <projectexplorer/kitinformation.h>
@@ -833,7 +835,8 @@ void CMakeGeneratorKitAspect::addToEnvironment(const Kit *k, Utils::Environment
if (info.generator == "NMake Makefiles JOM") {
if (env.searchInPath("jom.exe").exists())
return;
env.appendOrSetPath(QCoreApplication::applicationDirPath());
env.appendOrSetPath(Core::ICore::libexecPath().toUserOutput());
env.appendOrSetPath(Core::ICore::libexecPath().pathAppended("jom").toUserOutput());
}
}