diff options
author | Brad King <brad.king@kitware.com> | 2009-01-20 20:49:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-01-20 20:49:37 (GMT) |
commit | acb0e8fb8569c4d0abe9d98de72e86b07d83771d (patch) | |
tree | 9b5890e01345c380991745c65dbf5a174e774ef0 | |
parent | 2c81e5fb5cd592e9450250364e6667082014f0b7 (diff) | |
download | CMake-acb0e8fb8569c4d0abe9d98de72e86b07d83771d.zip CMake-acb0e8fb8569c4d0abe9d98de72e86b07d83771d.tar.gz CMake-acb0e8fb8569c4d0abe9d98de72e86b07d83771d.tar.bz2 |
BUG: Fix LOCATION property for Mac AppBundles
Previously cmTarget::GetLocation and cmTarget::GetFullPath would return
for Mac AppBundles the top-level bundle directory but without the .app
extension. We worked around this at the call sites. This fixes the
methods and removes the work-arounds. See issue #8406.
-rw-r--r-- | Source/cmExportBuildFileGenerator.cxx | 8 | ||||
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 10 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 10 |
3 files changed, 11 insertions, 17 deletions
diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx index 429bb53..f1c0685 100644 --- a/Source/cmExportBuildFileGenerator.cxx +++ b/Source/cmExportBuildFileGenerator.cxx @@ -106,16 +106,10 @@ cmExportBuildFileGenerator std::string prop = "IMPORTED_LOCATION"; prop += suffix; std::string value; - if(target->IsFrameworkOnApple()) + if(target->IsFrameworkOnApple() || target->IsAppBundleOnApple()) { value = target->GetFullPath(config, false); } - else if(target->IsAppBundleOnApple()) - { - value = target->GetFullPath(config, false); - value += ".app/Contents/MacOS/"; - value += target->GetFullName(config, false); - } else { value = target->GetFullPath(config, false, true); diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 52e3555..c749321 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2607,11 +2607,6 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget( t->GetType() == cmTarget::MODULE_LIBRARY) { std::string tfull = t->GetFullPath(configName); - if(t->IsAppBundleOnApple()) - { - tfull += ".app/Contents/MacOS/"; - tfull += t->GetFullName(configName); - } makefileStream << "\\\n\t" << this->ConvertToRelativeForMake(tfull.c_str()); } @@ -2669,11 +2664,6 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget( { // Create a rule for this target. std::string tfull = t->GetFullPath(configName); - if(t->IsAppBundleOnApple()) - { - tfull += ".app/Contents/MacOS/"; - tfull += t->GetFullName(configName); - } makefileStream << this->ConvertToRelativeForMake(tfull.c_str()) << ":"; diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 0f9366e..ae250d4 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1932,6 +1932,11 @@ const char* cmTarget::NormalGetLocation(const char* config) this->Location += cfgid; this->Location += "/"; } + if(this->IsAppBundleOnApple()) + { + this->Location += this->GetFullName(config, false); + this->Location += ".app/Contents/MacOS/"; + } if(this->IsFrameworkOnApple()) { this->Location += this->GetFullName(config, false); @@ -2446,6 +2451,11 @@ std::string cmTarget::NormalGetFullPath(const char* config, bool implib, std::string fpath = this->GetDirectory(config, implib); fpath += "/"; + if(this->IsAppBundleOnApple()) + { + fpath += this->GetFullName(config, false); + fpath += ".app/Contents/MacOS/"; + } if(this->IsFrameworkOnApple()) { fpath += this->GetFullName(config, false); |