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/cmGlobalXCodeGenerator.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/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 2e00d13..f9d4445 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1436,6 +1436,18 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, std::string version = target.GetFrameworkVersion(); buildSettings->AddAttribute("FRAMEWORK_VERSION", this->CreateString(version.c_str())); + + std::string plist = this->ComputeInfoPListLocation(target); + // Xcode will create the final version of Info.plist at build time, + // so let it replace the framework name. This avoids creating + // a per-configuration Info.plist file. + this->CurrentLocalGenerator + ->GenerateFrameworkInfoPList(&target, "$(EXECUTABLE_NAME)", + plist.c_str()); + std::string path = + this->ConvertToRelativeForXCode(plist.c_str()); + buildSettings->AddAttribute("INFOPLIST_FILE", + this->CreateString(path.c_str())); } else { |