summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeLinkInformation.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-06-24 12:46:12 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-06-24 12:46:12 (GMT)
commitb2d70c1a20caf8011a1cc8b9fe5fb59a614dd959 (patch)
treeea4bfbb83021fe81c54bd857c7dc8183ea4fb1f6 /Source/cmComputeLinkInformation.cxx
parent059be4ba3b8af00f3615726ba8d3ff485e2fcef4 (diff)
parentde4da665d3205afa239749c41513a315c3831f51 (diff)
downloadCMake-b2d70c1a20caf8011a1cc8b9fe5fb59a614dd959.zip
CMake-b2d70c1a20caf8011a1cc8b9fe5fb59a614dd959.tar.gz
CMake-b2d70c1a20caf8011a1cc8b9fe5fb59a614dd959.tar.bz2
Merge topic 'set-sysroot'
de4da66 Use --sysroot when cross compiling.
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r--Source/cmComputeLinkInformation.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index ab9eb14..0ba0139 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -1884,6 +1884,8 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs,
}
if(use_build_rpath || use_link_rpath)
{
+ std::string rootPath = this->Makefile->GetSafeDefinition("CMAKE_SYSROOT");
+ cmSystemTools::ConvertToUnixSlashes(rootPath);
std::vector<std::string> const& rdirs = this->GetRuntimeSearchPath();
for(std::vector<std::string>::const_iterator ri = rdirs.begin();
ri != rdirs.end(); ++ri)
@@ -1907,9 +1909,14 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs,
!cmSystemTools::IsSubDirectory(ri->c_str(), topSourceDir) &&
!cmSystemTools::IsSubDirectory(ri->c_str(), topBinaryDir))
{
- if(emitted.insert(*ri).second)
+ std::string d = *ri;
+ if (d.find(rootPath) == 0)
{
- runtimeDirs.push_back(*ri);
+ d = d.substr(rootPath.size());
+ }
+ if(emitted.insert(d).second)
+ {
+ runtimeDirs.push_back(d);
}
}
}