diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-06-14 23:12:10 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2022-06-14 23:27:30 (GMT) |
commit | a8115deebe49565089af6477dc70f9085e988dc0 (patch) | |
tree | d65368eb1556b5e55b90fc630cd0b5296875f27c | |
parent | ca8a5b05de811d6a95cfa7a33a2985f2b193967f (diff) | |
download | CMake-a8115deebe49565089af6477dc70f9085e988dc0.zip CMake-a8115deebe49565089af6477dc70f9085e988dc0.tar.gz CMake-a8115deebe49565089af6477dc70f9085e988dc0.tar.bz2 |
cmCommonTargetGenerator: fix linked target directory for multi-config builds
Without this, `Ninja Multi-Config` generators were not getting the right
directory to look for `<LANG>Modules.json` files for module information.
-rw-r--r-- | Source/cmCommonTargetGenerator.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index ba95168..5fe6756 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -9,6 +9,7 @@ #include "cmComputeLinkInformation.h" #include "cmGeneratorTarget.h" #include "cmGlobalCommonGenerator.h" +#include "cmGlobalGenerator.h" #include "cmLocalCommonGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" @@ -175,6 +176,9 @@ std::vector<std::string> cmCommonTargetGenerator::GetLinkedTargetDirectories( cmLocalGenerator* lg = linkee->GetLocalGenerator(); std::string di = cmStrCat(lg->GetCurrentBinaryDirectory(), '/', lg->GetTargetDirectory(linkee)); + if (lg->GetGlobalGenerator()->IsMultiConfig()) { + di = cmStrCat(di, '/', config); + } dirs.push_back(std::move(di)); } } |