multiarch: Treat lib/<arch> as implicit link dir (#12326)

Add multiarch library directories to the set of implicit link
directories.  In particular, this keeps lib/<arch> out of R(UN)PATH.
This commit is contained in:
Modestas Vainius 2011-07-25 13:24:41 -04:00 committed by Brad King
parent 1ed19bcb25
commit 317d077f6e
1 changed files with 12 additions and 0 deletions

View File

@ -1603,6 +1603,18 @@ void cmComputeLinkInformation::LoadImplicitLinkInfo()
cmSystemTools::ExpandListArgument(implicitLinks, implicitDirVec);
}
// Append library architecture to all implicit platform directories
// and add them to the set
if(const char* libraryArch =
this->Makefile->GetDefinition("CMAKE_LIBRARY_ARCHITECTURE"))
{
for (std::vector<std::string>::const_iterator i = implicitDirVec.begin();
i != implicitDirVec.end(); ++i)
{
this->ImplicitLinkDirs.insert(*i + "/" + libraryArch);
}
}
// Get language-specific implicit directories.
std::string implicitDirVar = "CMAKE_";
implicitDirVar += this->LinkLanguage;