mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 12:49:50 -05:00
ENH: Allow multiple OS X applications bundles to be created in a single build directory. Converted Info.plist files to be generated directly instead of configured with make variables. The MACOSX_BUNDLE_* variables are now properties (and vars for compatibility).
This commit is contained in:
@@ -1482,18 +1482,15 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
|
||||
if(target.GetPropertyAsBool("MACOSX_BUNDLE"))
|
||||
{
|
||||
productType = "com.apple.product-type.application";
|
||||
std::string f1 =
|
||||
this->CurrentMakefile->GetModulesFile("MacOSXBundleInfo.plist.in");
|
||||
if ( f1.size() == 0 )
|
||||
{
|
||||
cmSystemTools::Error("could not find Mac OSX bundle template file.");
|
||||
}
|
||||
std::string f2 = this->CurrentMakefile->GetCurrentOutputDirectory();
|
||||
f2 += "/Info.plist";
|
||||
this->CurrentMakefile->ConfigureFile(f1.c_str(), f2.c_str(),
|
||||
false, false, false);
|
||||
std::string path =
|
||||
this->ConvertToRelativeForXCode(f2.c_str());
|
||||
std::string plist = this->CurrentMakefile->GetCurrentOutputDirectory();
|
||||
plist += cmake::GetCMakeFilesDirectory();
|
||||
plist += "/";
|
||||
plist += target.GetName();
|
||||
plist += "Info.plist";
|
||||
this->CurrentLocalGenerator
|
||||
->GenerateAppleInfoPList(&target, productName.c_str(), plist.c_str());
|
||||
std::string path =
|
||||
this->ConvertToRelativeForXCode(plist.c_str());
|
||||
buildSettings->AddAttribute("INFOPLIST_FILE",
|
||||
this->CreateString(path.c_str()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user