From 317d077f6ed05640f86efbcb5c34d776a4ad9590 Mon Sep 17 00:00:00 2001 From: Modestas Vainius Date: Mon, 25 Jul 2011 13:24:41 -0400 Subject: multiarch: Treat lib/ as implicit link dir (#12326) Add multiarch library directories to the set of implicit link directories. In particular, this keeps lib/ out of R(UN)PATH. --- Source/cmComputeLinkInformation.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index e3c33a2..c87b64d 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -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::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; -- cgit v0.12