diff options
author | Brad King <brad.king@kitware.com> | 2013-08-26 14:28:10 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-08-26 14:28:10 (GMT) |
commit | 4923c6c724ffa64043d1bac5ec148e8d01f5d02a (patch) | |
tree | 33e2aa54b363a6a7deaf0b54e3f2fec51ca5faf8 /Source/cmTarget.cxx | |
parent | 32ea090a70a2d5cc8fbcfe2511492f74e97f7dff (diff) | |
parent | 78cd8842966efb6d54668d47ee92bdeed35cc79e (diff) | |
download | CMake-4923c6c724ffa64043d1bac5ec148e8d01f5d02a.zip CMake-4923c6c724ffa64043d1bac5ec148e8d01f5d02a.tar.gz CMake-4923c6c724ffa64043d1bac5ec148e8d01f5d02a.tar.bz2 |
Merge topic 'rpath-on-mac'
78cd884 OSX: Allow an empty INSTALL_NAME_DIR to override MACOSX_RPATH.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index ddb4e85..147c332 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1617,7 +1617,7 @@ void cmTarget::SetMakefile(cmMakefile* mf) this->IsApple = this->Makefile->IsOn("APPLE"); // Setup default property values. - this->SetPropertyDefault("INSTALL_NAME_DIR", ""); + this->SetPropertyDefault("INSTALL_NAME_DIR", 0); this->SetPropertyDefault("INSTALL_RPATH", ""); this->SetPropertyDefault("INSTALL_RPATH_USE_LINK_PATH", "OFF"); this->SetPropertyDefault("SKIP_BUILD_RPATH", "OFF"); @@ -4570,6 +4570,10 @@ bool cmTarget::HasMacOSXRpath(const char* config) { install_name_is_rpath = true; } + else if(install_name && use_install_name) + { + return false; + } } else { @@ -5302,18 +5306,18 @@ std::string cmTarget::GetInstallNameDirForInstallTree() if(this->Makefile->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME")) { std::string dir; + const char* install_name_dir = this->GetProperty("INSTALL_NAME_DIR"); if(!this->Makefile->IsOn("CMAKE_SKIP_RPATH") && !this->Makefile->IsOn("CMAKE_SKIP_INSTALL_RPATH")) { - const char* install_name_dir = this->GetProperty("INSTALL_NAME_DIR"); if(install_name_dir && *install_name_dir) { dir = install_name_dir; dir += "/"; } } - if(dir.empty() && this->GetPropertyAsBool("MACOSX_RPATH")) + if(!install_name_dir && this->GetPropertyAsBool("MACOSX_RPATH")) { dir = "@rpath/"; } |