diff options
author | Christian Stenger <christian.stenger@qt.io> | 2020-08-31 14:28:10 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2020-09-08 11:58:24 +0000 |
commit | 158ac2d339f8018794b370ae9d59d71dc230ada8 (patch) | |
tree | 65c9acb1c132e7e4c05f0d634c48ece260d2078b /src/plugins/nim/project/nimblebuildstep.cpp | |
parent | 79010891e16df95e82d98c72dc4b07234e02f069 (diff) | |
download | qt-creator-158ac2d339f8018794b370ae9d59d71dc230ada8.tar.gz |
Nim: Fix running when building with nimble
Change-Id: I62b2eebf408119a19f0e98958e3132c16c9c6aa5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/nim/project/nimblebuildstep.cpp')
-rw-r--r-- | src/plugins/nim/project/nimblebuildstep.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/nim/project/nimblebuildstep.cpp b/src/plugins/nim/project/nimblebuildstep.cpp index a8a84ff901..4bb2c34520 100644 --- a/src/plugins/nim/project/nimblebuildstep.cpp +++ b/src/plugins/nim/project/nimblebuildstep.cpp @@ -24,6 +24,7 @@ ****************************************************************************/ #include "nimblebuildstep.h" + #include "nimconstants.h" #include "nimbleproject.h" #include "nimbuildsystem.h" @@ -34,6 +35,7 @@ #include <projectexplorer/processparameters.h> #include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/runconfigurationaspects.h> +#include <projectexplorer/target.h> #include <QRegularExpression> #include <QStandardPaths> @@ -107,14 +109,12 @@ NimbleBuildStep::NimbleBuildStep(BuildStepList *parentList, Id id) m_arguments->setArguments(defaultArguments()); setCommandLineProvider([this] { - auto bs = static_cast<NimBuildSystem *>(buildSystem()); - return CommandLine(bs->defaultNimble(), + return CommandLine(Nim::nimblePathFromKit(target()->kit()), {"build", m_arguments->arguments(macroExpander())}); }); setWorkingDirectoryProvider([this] { return project()->projectDirectory(); }); setEnvironmentModifier([this](Environment &env) { - auto bs = static_cast<NimBuildSystem *>(buildSystem()); - env.appendOrSetPath(bs->nimPathFromKit().toUserOutput()); + env.appendOrSetPath(Nim::nimPathFromKit(target()->kit()).toUserOutput()); }); QTC_ASSERT(buildConfiguration(), return); |