ENH: xcode almost working for simple exe, but not yet

This commit is contained in:
Bill Hoffman 2005-01-27 17:09:09 -05:00
parent 29f9516e19
commit b9982e4b60
2 changed files with 6 additions and 3 deletions

View File

@ -188,15 +188,15 @@ void cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
target->AddAttribute("name", this->CreateString(l->first.c_str())); target->AddAttribute("name", this->CreateString(l->first.c_str()));
target->AddAttribute("productName",this->CreateString(l->first.c_str())); target->AddAttribute("productName",this->CreateString(l->first.c_str()));
cmXCodeObject* fileRef = this->CreateObject(cmXCodeObject::PBXFileReference); cmXCodeObject* fileRef = this->CreateObject(cmXCodeObject::PBXFileReference);
fileRef->AddAttribute("explicitFileType", this->CreateString("compiled.mach-o.executable")); fileRef->AddAttribute("explicitFileType", this->CreateString("\"compiled.mach-o.executable\""));
fileRef->AddAttribute("includedInIndex", this->CreateString("0")); fileRef->AddAttribute("includedInIndex", this->CreateString("0"));
fileRef->AddAttribute("path", this->CreateString(l->first.c_str())); fileRef->AddAttribute("path", this->CreateString(l->first.c_str()));
fileRef->AddAttribute("refType", this->CreateString("3")); fileRef->AddAttribute("refType", this->CreateString("3"));
fileRef->AddAttribute("sourceTree", this->CreateString("BUILT_PRODUCTS_DIR")); fileRef->AddAttribute("sourceTree", this->CreateString("BUILT_PRODUCTS_DIR"));
cmXCodeObject* fileRefPtr = this->CreateObject(cmXCodeObject::OBJECT_REF); cmXCodeObject* fileRefPtr = this->CreateObject(cmXCodeObject::OBJECT_REF);
fileRefPtr->AddObject(fileRef); fileRefPtr->SetObject(fileRef);
target->AddAttribute("productReference", fileRefPtr); target->AddAttribute("productReference", fileRefPtr);
target->AddAttribute("productReference", this->CreateString("com.apple.product-type.tool")); target->AddAttribute("productType", this->CreateString("\"com.apple.product-type.tool\""));
} }
else if (l->second.GetType() == cmTarget::UTILITY) else if (l->second.GetType() == cmTarget::UTILITY)
{ {

View File

@ -1,4 +1,6 @@
#include "cmXCodeObject.h" #include "cmXCodeObject.h"
#include "cmSystemTools.h"
const char* cmXCodeObject::PBXTypeNames[] = { const char* cmXCodeObject::PBXTypeNames[] = {
"PBXGroup", "PBXBuildStyle", "PBXProject", "PBXHeadersBuildPhase", "PBXGroup", "PBXBuildStyle", "PBXProject", "PBXHeadersBuildPhase",
"PBXSourcesBuildPhase", "PBXFrameworksBuildPhase", "PBXNativeTarget", "PBXSourcesBuildPhase", "PBXFrameworksBuildPhase", "PBXNativeTarget",
@ -17,6 +19,7 @@ cmXCodeObject::cmXCodeObject(PBXType ptype, Type type)
str << (void*)this; str << (void*)this;
str << (void*)this; str << (void*)this;
m_Id = str.str(); m_Id = str.str();
cmSystemTools::ReplaceString(m_Id, "0x", "");
m_Type = type; m_Type = type;
if(m_Type == OBJECT) if(m_Type == OBJECT)
{ {