forked from qt-creator/qt-creator
CMake: fixup env if jom is missing
Add the applitcation dir path to the path environment variable if jom cannot be found there. This should fix the cannot find jom error for binary releases since we ship jom with qc. Fixes: QTCREATORBUG-22645 Change-Id: Ia3b55f794d3ac4b5fd6d2e85cf19f00bd8cddd2c Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -787,6 +787,16 @@ KitAspectWidget *CMakeGeneratorKitAspect::createConfigWidget(Kit *k) const
|
||||
return new CMakeGeneratorKitAspectWidget(k, this);
|
||||
}
|
||||
|
||||
void CMakeGeneratorKitAspect::addToEnvironment(const Kit *k, Utils::Environment &env) const
|
||||
{
|
||||
GeneratorInfo info = generatorInfo(k);
|
||||
if (info.generator == "NMake Makefiles JOM") {
|
||||
if (env.searchInPath("jom.exe").exists())
|
||||
return;
|
||||
env.appendOrSetPath(QCoreApplication::applicationDirPath());
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// CMakeConfigurationKitAspect:
|
||||
// --------------------------------------------------------------------
|
||||
|
@@ -83,6 +83,7 @@ public:
|
||||
void upgrade(ProjectExplorer::Kit *k) final;
|
||||
ItemList toUserOutput(const ProjectExplorer::Kit *k) const final;
|
||||
ProjectExplorer::KitAspectWidget *createConfigWidget(ProjectExplorer::Kit *k) const final;
|
||||
void addToEnvironment(const ProjectExplorer::Kit *k, Utils::Environment &env) const final;
|
||||
|
||||
private:
|
||||
QVariant defaultValue(const ProjectExplorer::Kit *k) const;
|
||||
|
Reference in New Issue
Block a user