diff options
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 1f3046a..e63b44f 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -535,10 +535,13 @@ bool cmComputeLinkInformation::Compute() i != wrongItems.end(); ++i) { cmTarget const* tgt = *i; + cmGeneratorTarget *gtgt = tgt->GetMakefile() + ->GetGlobalGenerator() + ->GetGeneratorTarget(tgt); bool implib = (this->UseImportLibrary && (tgt->GetType() == cmTarget::SHARED_LIBRARY)); - std::string lib = tgt->GetFullPath(this->Config , implib, true); + std::string lib = gtgt->GetFullPath(this->Config , implib, true); this->OldLinkDirItems.push_back(lib); } } @@ -637,6 +640,9 @@ void cmComputeLinkInformation::AddItem(std::string const& item, if(tgt && tgt->IsLinkable()) { + cmGeneratorTarget *gtgt = tgt->GetMakefile() + ->GetGlobalGenerator() + ->GetGeneratorTarget(tgt); // This is a CMake target. Ask the target for its real name. if(impexe && this->LoaderFlag) { @@ -645,7 +651,8 @@ void cmComputeLinkInformation::AddItem(std::string const& item, // platform. Add it now. std::string linkItem; linkItem = this->LoaderFlag; - std::string exe = tgt->GetFullPath(config, this->UseImportLibrary, + + std::string exe = gtgt->GetFullPath(config, this->UseImportLibrary, true); linkItem += exe; this->Items.push_back(Item(linkItem, true, tgt)); @@ -666,7 +673,7 @@ void cmComputeLinkInformation::AddItem(std::string const& item, (impexe || tgt->GetType() == cmTarget::SHARED_LIBRARY)); // Pass the full path to the target file. - std::string lib = tgt->GetFullPath(config, implib, true); + std::string lib = gtgt->GetFullPath(config, implib, true); if(!this->LinkDependsNoShared || tgt->GetType() != cmTarget::SHARED_LIBRARY) { @@ -755,7 +762,10 @@ void cmComputeLinkInformation::AddSharedDepItem(std::string const& item, std::string lib; if(tgt) { - lib = tgt->GetFullPath(this->Config, this->UseImportLibrary); + cmGeneratorTarget *gtgt = tgt->GetMakefile() + ->GetGlobalGenerator() + ->GetGeneratorTarget(tgt); + lib = gtgt->GetFullPath(this->Config, this->UseImportLibrary); this->AddLibraryRuntimeInfo(lib, tgt); } else |