summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2004-08-24 15:30:33 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2004-08-24 15:30:33 (GMT)
commitded244d1a86ae17efee4dd3605efd1c10f6f3cd5 (patch)
treea2b0d3240c8984c29c1aa9081ac91fe92db4b901 /Source
parent81487bdb797d3cc72bde41775a68e54f2981dd5f (diff)
downloadCMake-ded244d1a86ae17efee4dd3605efd1c10f6f3cd5.zip
CMake-ded244d1a86ae17efee4dd3605efd1c10f6f3cd5.tar.gz
CMake-ded244d1a86ae17efee4dd3605efd1c10f6f3cd5.tar.bz2
ERR: Fix the list of targets. The base target name now includes the MACOSX_BUNDLE path
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalUnixMakefileGenerator.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx
index d866151..63de272 100644
--- a/Source/cmLocalUnixMakefileGenerator.cxx
+++ b/Source/cmLocalUnixMakefileGenerator.cxx
@@ -337,6 +337,15 @@ std::string cmLocalUnixMakefileGenerator::GetOutputExtension(const char* s)
std::string cmLocalUnixMakefileGenerator::GetBaseTargetName(const char* n,
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* prefixVar = 0;
switch(t.GetType())
@@ -361,7 +370,7 @@ std::string cmLocalUnixMakefileGenerator::GetBaseTargetName(const char* n,
{
targetPrefix = m_Makefile->GetSafeDefinition(prefixVar);
}
- std::string name = targetPrefix?targetPrefix:"";
+ std::string name = pathPrefix + (targetPrefix?targetPrefix:"");
name += n;
return name;
}