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.
This commit is contained in:
Brad King
2009-01-20 15:49:37 -05:00
parent 2c81e5fb5c
commit acb0e8fb85
3 changed files with 11 additions and 17 deletions
+1 -7
View File
@@ -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);