diff options
author | David Cole <david.cole@kitware.com> | 2012-07-24 21:03:46 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-07-24 21:03:46 (GMT) |
commit | a51e1529e79ef46c8f7f346328c788a4e630e474 (patch) | |
tree | 7fed8476e05fe1278f09a130cdf2080c12762c42 /Source/cmMakefileExecutableTargetGenerator.cxx | |
parent | c1bbdbff57651a24fd8d7d5abe67dd24e7e6ed27 (diff) | |
parent | 1fc8df9ca22c23f42afa94a949918cda008b07ce (diff) | |
download | CMake-a51e1529e79ef46c8f7f346328c788a4e630e474.zip CMake-a51e1529e79ef46c8f7f346328c788a4e630e474.tar.gz CMake-a51e1529e79ef46c8f7f346328c788a4e630e474.tar.bz2 |
Merge topic 'ninja-fix-macosx'
1fc8df9 Add missing this->.
7a3ecf5 Fix memory leak in Makefile generator.
9f7dc83 Ninja: also bootstrap ninja files
5d365b2 Ninja: enable ninja support everywhere
d569f3e Ninja: void function can't return a value
52160bf Ninja: enable ninja on Mac so all Mac CDash-builds are tested, cleanup later
56aeac6 Ninja: fixes for bcc
7a6bc9e Ninja: remove 'this' from member initializer list
44ba4cf Ninja: remove warnings
7751966 Ninja: remove 'friend' in ninja code
c3988ee Re-factor OS X content generator start up.
f8e0a51 Re-factor framework directory computation.
f36c7b0 Re-factor Mac OS X content directory computation.
5d885db Re-factor bundle content copying rules generation.
3b2a01e Ninja: Use same echo message as makefiles.
7bb56c5 Re-factor CFBundle generation.
...
Diffstat (limited to 'Source/cmMakefileExecutableTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileExecutableTargetGenerator.cxx | 45 |
1 files changed, 15 insertions, 30 deletions
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 78278cb..ab5150a 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -29,13 +29,19 @@ cmMakefileExecutableTargetGenerator this->TargetNameOut, this->TargetNameReal, this->TargetNameImport, this->TargetNamePDB, this->ConfigName); - if(this->Target->IsAppBundleOnApple()) - { - this->MacContentDirectory = this->Target->GetDirectory(this->ConfigName); - this->MacContentDirectory += "/"; - this->MacContentDirectory += this->TargetNameOut; - this->MacContentDirectory += ".app/Contents/"; - } + this->OSXBundleGenerator = new cmOSXBundleGenerator(this->Target, + this->TargetNameOut, + this->ConfigName); + this->OSXBundleGenerator->SetMacContentFolders(&this->MacContentFolders); + this->MacContentDirectory = + this->OSXBundleGenerator->GetMacContentDirectory(); +} + +//---------------------------------------------------------------------------- +cmMakefileExecutableTargetGenerator +::~cmMakefileExecutableTargetGenerator() +{ + delete this->OSXBundleGenerator; } //---------------------------------------------------------------------------- @@ -100,7 +106,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) outpath += "/"; if(this->Target->IsAppBundleOnApple()) { - this->CreateAppBundle(targetName, outpath); + this->OSXBundleGenerator->CreateAppBundle(targetName, outpath); } std::string outpathImp; if(relink) @@ -129,7 +135,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) std::string targetFullPathReal = outpath + targetNameReal; std::string targetFullPathPDB = outpath + targetNamePDB; std::string targetFullPathImport = outpathImp + targetNameImport; - std::string targetOutPathPDB = + std::string targetOutPathPDB = this->Convert(targetFullPathPDB.c_str(), cmLocalGenerator::NONE, cmLocalGenerator::SHELL); @@ -440,24 +446,3 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) exeCleanFiles.begin(), exeCleanFiles.end()); } - -//---------------------------------------------------------------------------- -void -cmMakefileExecutableTargetGenerator::CreateAppBundle(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 + "Info.plist"; - this->LocalGenerator->GenerateAppleInfoPList(this->Target, - targetName.c_str(), - plist.c_str()); - this->Makefile->AddCMakeOutputFile(plist.c_str()); -} |