[cmake-commits] king committed cmGlobalXCodeGenerator.cxx 1.159
1.159.2.1
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Jun 13 15:21:05 EDT 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv11669
Modified Files:
Tag: CMake-SourceFile2-b
cmGlobalXCodeGenerator.cxx
Log Message:
COMP: Fixed for new cmSourceFile interface.
Index: cmGlobalXCodeGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.cxx,v
retrieving revision 1.159
retrieving revision 1.159.2.1
diff -u -d -r1.159 -r1.159.2.1
--- cmGlobalXCodeGenerator.cxx 28 May 2007 21:49:03 -0000 1.159
+++ cmGlobalXCodeGenerator.cxx 13 Jun 2007 19:21:03 -0000 1.159.2.1
@@ -440,9 +440,7 @@
cmXCodeObject* children = group->GetObject("children");
children->AddObject(fileRef);
cmXCodeObject* buildFile = this->CreateObject(cmXCodeObject::PBXBuildFile);
- std::string fname = sf->GetSourceName();
- fname += ".";
- fname += sf->GetSourceExtension();
+ std::string fname = sf->GetFullPath();
std::string comment = fname;
comment += " in ";
std::string gname = group->GetObject("name")->GetString();
@@ -458,7 +456,7 @@
const char* lang =
this->CurrentLocalGenerator->GetSourceFileLanguage(*sf);
std::string sourcecode = "sourcecode";
- std::string ext = sf->GetSourceExtension();
+ std::string ext = sf->GetExtension();
ext = cmSystemTools::LowerCase(ext);
if(ext == "o")
{
@@ -499,10 +497,10 @@
fileRef->AddAttribute("lastKnownFileType",
this->CreateString(sourcecode.c_str()));
std::string path =
- this->ConvertToRelativeForXCode(sf->GetFullPath().c_str());
+ this->ConvertToRelativeForXCode(sf->GetFullPath());
std::string dir;
std::string file;
- cmSystemTools::SplitProgramPath(sf->GetFullPath().c_str(),
+ cmSystemTools::SplitProgramPath(sf->GetFullPath(),
dir, file);
fileRef->AddAttribute("name", this->CreateString(file.c_str()));
@@ -2046,12 +2044,12 @@
// MACOSX_BUNDLE file
if(cmtarget.GetPropertyAsBool("MACOSX_BUNDLE"))
{
- cmSourceFile file;
- file.SetName("Info",
- this->CurrentMakefile->GetCurrentOutputDirectory(),
- "plist", false);
- cmtarget.AddSourceFile
- (this->CurrentMakefile->AddSource(file));
+ std::string plistFile =
+ this->CurrentMakefile->GetCurrentOutputDirectory();
+ plistFile += "/Info.plist";
+ cmSourceFile* sf =
+ this->CurrentMakefile->GetOrCreateSource(plistFile.c_str(), true);
+ cmtarget.AddSourceFile(sf);
}
std::vector<cmSourceFile*> classes = cmtarget.GetSourceFiles();
// add framework copy headers
More information about the Cmake-commits
mailing list