diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx index 429bb53c5..f1c068531 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 52e3555b1..c749321c9 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 0f9366e45..ae250d452 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);