summaryrefslogtreecommitdiffstats
path: root/Source/cmOSXBundleGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmOSXBundleGenerator.cxx')
-rw-r--r--Source/cmOSXBundleGenerator.cxx31
1 files changed, 31 insertions, 0 deletions
diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx
index d7afcd6..b3210eb 100644
--- a/Source/cmOSXBundleGenerator.cxx
+++ b/Source/cmOSXBundleGenerator.cxx
@@ -16,6 +16,16 @@
#include <cassert>
+void cmOSXBundleGenerator::PrepareTargetProperties(cmTarget* target)
+{
+ if(target->IsCFBundleOnApple())
+ {
+ target->SetProperty("PREFIX", "");
+ target->SetProperty("SUFFIX", "");
+ }
+}
+
+//----------------------------------------------------------------------------
cmOSXBundleGenerator::
cmOSXBundleGenerator(cmTarget* target,
std::string targetNameOut,
@@ -169,3 +179,24 @@ void cmOSXBundleGenerator::CreateFramework(std::string const& targetName)
this->Makefile->AddCMakeOutputFile(newName.c_str());
}
}
+
+//----------------------------------------------------------------------------
+void cmOSXBundleGenerator::CreateCFBundle(std::string& targetName,
+ std::string& outpath)
+{
+ // Compute bundle directory names.
+ outpath = this->MacContentDirectory;
+ outpath += "MacOS";
+ cmSystemTools::MakeDirectory(outpath.c_str());
+ this->Makefile->AddCMakeOutputFile(outpath.c_str());
+ outpath += "/";
+
+ // Configure the Info.plist file. Note that it needs the executable name
+ // to be set.
+ std::string plist = this->MacContentDirectory;
+ plist += "Info.plist";
+ this->LocalGenerator->GenerateAppleInfoPList(this->Target,
+ targetName.c_str(),
+ plist.c_str());
+ this->Makefile->AddCMakeOutputFile(plist.c_str());
+}