From 59001281bb917c436c3ec03301769a863d60985a Mon Sep 17 00:00:00 2001 From: Brad King Date: Sat, 1 Mar 2008 13:02:08 -0500 Subject: 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. --- Source/cmTarget.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 880c370..c14e527 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -3007,6 +3007,18 @@ void cmTarget::GetLanguages(std::set& 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( -- cgit v0.12