Merge topic 'library-multiarch-issue-12326'

317d077 multiarch: Treat lib/<arch> as implicit link dir (#12326)
This commit is contained in:
David Cole 2011-08-02 15:09:45 -04:00 committed by CMake Topic Stage
commit c6051b7abd
1 changed files with 12 additions and 0 deletions

View File

@ -1603,6 +1603,18 @@ void cmComputeLinkInformation::LoadImplicitLinkInfo()
cmSystemTools::ExpandListArgument(implicitLinks, implicitDirVec); 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. // Get language-specific implicit directories.
std::string implicitDirVar = "CMAKE_"; std::string implicitDirVar = "CMAKE_";
implicitDirVar += this->LinkLanguage; implicitDirVar += this->LinkLanguage;