summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-09-02 16:06:32 (GMT)
committerBrad King <brad.king@kitware.com>2008-09-02 16:06:32 (GMT)
commitf89dae7a9473a05ecd2ccbfe409b6f33523da603 (patch)
treef28b8d91e2fa1c5604764185d30a3ecb9b093f5f /Source/cmGlobalXCodeGenerator.cxx
parenta54e97cf946e82de6b73c26c64b7fe3efdf0be43 (diff)
downloadCMake-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.cxx12
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
{