diff options
author | Brad King <brad.king@kitware.com> | 2008-09-02 16:06:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-09-02 16:06:32 (GMT) |
commit | f89dae7a9473a05ecd2ccbfe409b6f33523da603 (patch) | |
tree | f28b8d91e2fa1c5604764185d30a3ecb9b093f5f /Source/cmMakefileLibraryTargetGenerator.cxx | |
parent | a54e97cf946e82de6b73c26c64b7fe3efdf0be43 (diff) | |
download | CMake-f89dae7a9473a05ecd2ccbfe409b6f33523da603.zip CMake-f89dae7a9473a05ecd2ccbfe409b6f33523da603.tar.gz CMake-f89dae7a9473a05ecd2ccbfe409b6f33523da603.tar.bz2 |
ENH: Create Info.plist files in OS X Frameworks
A Mac OS X Framework should provide a Resources/Info.plist file
containing meta-data about the framework. This change generates a
default Info.plist for frameworks and provides an interface for users to
customize it.
Diffstat (limited to 'Source/cmMakefileLibraryTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileLibraryTargetGenerator.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 7bd12a0..9c0cc38 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -235,8 +235,17 @@ void cmMakefileLibraryTargetGenerator::WriteFrameworkRules(bool relink) } //---------------------------------------------------------------------------- -void cmMakefileLibraryTargetGenerator::CreateFramework() +void +cmMakefileLibraryTargetGenerator +::CreateFramework(std::string const& targetName) { + // Configure the Info.plist file into the Resources directory. + this->MacContentFolders.insert("Resources"); + std::string plist = this->MacContentDirectory + "Resources/Info.plist"; + this->LocalGenerator->GenerateFrameworkInfoPList(this->Target, + targetName.c_str(), + plist.c_str()); + // TODO: Use the cmMakefileTargetGenerator::ExtraFiles vector to // drive rules to create these files at build time. std::string oldName; @@ -388,7 +397,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules if(this->Target->IsFrameworkOnApple()) { outpath = this->MacContentDirectory; - this->CreateFramework(); + this->CreateFramework(targetName); } else if(relink) { |