diff options
author | Nicolas Despres <nicolas.despres@gmail.com> | 2012-07-16 14:00:40 (GMT) |
---|---|---|
committer | Peter Kümmel <syntheticpp@gmx.net> | 2012-07-17 12:03:09 (GMT) |
commit | 7bb56c511eaabf2071cd311b6cf14453651127e4 (patch) | |
tree | c9c9d4938652d59af72835c68dcdc1e3f51306da /Source/cmOSXBundleGenerator.cxx | |
parent | 03bdaf545369d4438a8aece8d3cec603d3a99727 (diff) | |
download | CMake-7bb56c511eaabf2071cd311b6cf14453651127e4.zip CMake-7bb56c511eaabf2071cd311b6cf14453651127e4.tar.gz CMake-7bb56c511eaabf2071cd311b6cf14453651127e4.tar.bz2 |
Re-factor CFBundle generation.
Diffstat (limited to 'Source/cmOSXBundleGenerator.cxx')
-rw-r--r-- | Source/cmOSXBundleGenerator.cxx | 31 |
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()); +} |