BUG: Do not try to change the RPATH when installing a target if CMAKE_SKIP_RPATH is on or the path does not need to be changed.

This commit is contained in:
Brad King 2008-03-01 13:02:08 -05:00
parent 34c76d4304
commit 59001281bb
1 changed files with 12 additions and 0 deletions

View File

@ -3007,6 +3007,18 @@ void cmTarget::GetLanguages(std::set<cmStdString>& languages) const
bool cmTarget::IsChrpathUsed()
{
#if defined(CMAKE_USE_ELF_PARSER)
// Skip chrpath if skipping rpath altogether.
if(this->Makefile->IsOn("CMAKE_SKIP_RPATH"))
{
return false;
}
// Skip chrpath if it does not need to be changed at install time.
if(this->GetPropertyAsBool("BUILD_WITH_INSTALL_RPATH"))
{
return false;
}
// Enable if the rpath flag uses a separator and the target uses ELF
// binaries.
if(const char* ll = this->GetLinkerLanguage(