ENH: fix missing plist file error

This commit is contained in:
Bill Hoffman 2006-01-06 13:54:27 -05:00
parent cda76d7eff
commit 0edceb3884
1 changed files with 7 additions and 5 deletions

View File

@ -1150,14 +1150,16 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
fileType = "compiled.mach-o.executable"; fileType = "compiled.mach-o.executable";
if(target.GetPropertyAsBool("MACOSX_BUNDLE")) if(target.GetPropertyAsBool("MACOSX_BUNDLE"))
{ {
std::string f1 = m_CurrentMakefile->GetModulesFile("MacOSXBundleInfo.plist.in"); std::string f1 =
m_CurrentMakefile->GetModulesFile("MacOSXBundleInfo.plist.in");
if ( f1.size() == 0 ) if ( f1.size() == 0 )
{ {
cmSystemTools::Error("could not find Mac OSX bundle template file."); cmSystemTools::Error("could not find Mac OSX bundle template file.");
} }
std::string f2 = m_CurrentMakefile->GetCurrentOutputDirectory(); std::string f2 = m_CurrentMakefile->GetCurrentOutputDirectory();
f2 += "/Info.plist"; f2 += "/Info.plist";
m_CurrentMakefile->ConfigureFile(f1.c_str(), f2.c_str(), false, false, false); m_CurrentMakefile->ConfigureFile(f1.c_str(), f2.c_str(),
false, false, false);
productType = "com.apple.product-type.application"; productType = "com.apple.product-type.application";
std::string path = std::string path =
this->ConvertToRelativeForXCode(f2.c_str()); this->ConvertToRelativeForXCode(f2.c_str());
@ -1799,9 +1801,9 @@ void cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root,
if(cmtarget.GetPropertyAsBool("MACOSX_BUNDLE")) if(cmtarget.GetPropertyAsBool("MACOSX_BUNDLE"))
{ {
cmSourceFile file; cmSourceFile file;
file.SetName("Info.plist", m_CurrentMakefile->GetCurrentOutputDirectory(), file.SetName("Info",
m_CurrentMakefile->GetSourceExtensions(), m_CurrentMakefile->GetCurrentOutputDirectory(),
m_CurrentMakefile->GetHeaderExtensions()); "plist", false);
cmtarget.GetSourceFiles().push_back(m_CurrentMakefile->AddSource(file)); cmtarget.GetSourceFiles().push_back(m_CurrentMakefile->AddSource(file));
} }