summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2007-05-08 14:32:54 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2007-05-08 14:32:54 (GMT)
commit9323a2798973b3dbe8ca9725f1cb5c8ff6d5900b (patch)
treeadf91f5e20d08609ec5c83ec09376fdc9e168f46 /Source/cmTarget.cxx
parent96232d405236231e6f4ba858a70621da9066f26c (diff)
downloadCMake-9323a2798973b3dbe8ca9725f1cb5c8ff6d5900b.zip
CMake-9323a2798973b3dbe8ca9725f1cb5c8ff6d5900b.tar.gz
CMake-9323a2798973b3dbe8ca9725f1cb5c8ff6d5900b.tar.bz2
ENH: initial support for creation of frameworks on Mac
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx19
1 files changed, 18 insertions, 1 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 5b15428..85f3d6e 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1634,6 +1634,14 @@ void cmTarget::GetFullNameInternal(TargetType type,
{
targetSuffix = this->Makefile->GetSafeDefinition(suffixVar);
}
+#if defined(__APPLE__)
+ // frameworks do not have a prefix or a suffix
+ if(this->GetPropertyAsBool("FRAMEWORK"))
+ {
+ targetPrefix = 0;
+ targetSuffix = 0;
+ }
+#endif
// Begin the final name with the prefix.
outPrefix = targetPrefix?targetPrefix:"";
@@ -2145,7 +2153,6 @@ const char* cmTarget::GetOutputDir(bool implib)
// Default to the current output directory.
out = ".";
}
-
// Convert the output path to a full path in case it is
// specified as a relative path. Treat a relative path as
// relative to the current output directory for this makefile.
@@ -2153,6 +2160,16 @@ const char* cmTarget::GetOutputDir(bool implib)
cmSystemTools::CollapseFullPath
(out.c_str(), this->Makefile->GetStartOutputDirectory());
+#if defined(__APPLE__)
+ // frameworks do not have a prefix or a suffix
+ if(this->GetPropertyAsBool("FRAMEWORK"))
+ {
+ out += "/";
+ out += this->GetFullName(0, implib);
+ out += ".framework";
+ }
+#endif
+
// Make sure the output path exists on disk.
if(!cmSystemTools::MakeDirectory(out.c_str()))
{