summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2009-12-14 22:46:29 (GMT)
committerDavid Cole <david.cole@kitware.com>2009-12-14 22:46:29 (GMT)
commit19839e96f61f215fb0f5de2a3d752bb0661fb1f1 (patch)
tree7828acee3d2efc3f55e1e2571c659aff04a44ebe /Source
parent68374fe078916be7536f8bc107b75a8a9db578e5 (diff)
downloadCMake-19839e96f61f215fb0f5de2a3d752bb0661fb1f1.zip
CMake-19839e96f61f215fb0f5de2a3d752bb0661fb1f1.tar.gz
CMake-19839e96f61f215fb0f5de2a3d752bb0661fb1f1.tar.bz2
Fix issue #9054 - ensure a valid install name for frameworks.
When the INSTALL_NAME_DIR property is empty, still use a name of the form <name>.framework/Versions/<version>/<name> for installed frameworks.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmTarget.cxx21
1 files changed, 14 insertions, 7 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 35876c5..0c8f14a 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -3476,14 +3476,20 @@ std::string cmTarget::GetInstallNameDirForBuildTree(const char* config,
std::string cmTarget::GetInstallNameDirForInstallTree(const char* config,
bool for_xcode)
{
- // Lookup the target property.
- const char* install_name_dir = this->GetProperty("INSTALL_NAME_DIR");
- if(this->Makefile->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME") &&
- !this->Makefile->IsOn("CMAKE_SKIP_RPATH") &&
- install_name_dir && *install_name_dir)
+ if(this->Makefile->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME"))
{
- std::string dir = install_name_dir;
- dir += "/";
+ std::string dir;
+
+ if(!this->Makefile->IsOn("CMAKE_SKIP_RPATH"))
+ {
+ const char* install_name_dir = this->GetProperty("INSTALL_NAME_DIR");
+ if(install_name_dir && *install_name_dir)
+ {
+ dir = install_name_dir;
+ dir += "/";
+ }
+ }
+
if(this->IsFrameworkOnApple() && !for_xcode)
{
dir += this->GetFullName(config, false);
@@ -3491,6 +3497,7 @@ std::string cmTarget::GetInstallNameDirForInstallTree(const char* config,
dir += this->GetFrameworkVersion();
dir += "/";
}
+
return dir;
}
else