ERR: Fix the list of targets. The base target name now includes the MACOSX_BUNDLE path

This commit is contained in:
Andy Cedilnik 2004-08-24 11:30:33 -04:00
parent 81487bdb79
commit ded244d1a8
1 changed files with 10 additions and 1 deletions

View File

@ -337,6 +337,15 @@ std::string cmLocalUnixMakefileGenerator::GetOutputExtension(const char* s)
std::string cmLocalUnixMakefileGenerator::GetBaseTargetName(const char* n, std::string cmLocalUnixMakefileGenerator::GetBaseTargetName(const char* n,
const cmTarget& t) const cmTarget& t)
{ {
std::string pathPrefix = "";
#ifdef __APPLE__
if ( t.GetPropertyAsBool("MACOSX_BUNDLE") )
{
pathPrefix = n;
pathPrefix += ".app/Contents/MacOS/";
}
#endif
const char* targetPrefix = t.GetProperty("PREFIX"); const char* targetPrefix = t.GetProperty("PREFIX");
const char* prefixVar = 0; const char* prefixVar = 0;
switch(t.GetType()) switch(t.GetType())
@ -361,7 +370,7 @@ std::string cmLocalUnixMakefileGenerator::GetBaseTargetName(const char* n,
{ {
targetPrefix = m_Makefile->GetSafeDefinition(prefixVar); targetPrefix = m_Makefile->GetSafeDefinition(prefixVar);
} }
std::string name = targetPrefix?targetPrefix:""; std::string name = pathPrefix + (targetPrefix?targetPrefix:"");
name += n; name += n;
return name; return name;
} }