diff -Nur cmake-2.6.2/Source/cmGlobalXCodeGenerator.cxx cmake-dash-2.6.2/Source/cmGlobalXCodeGenerator.cxx
--- cmake-2.6.2/Source/cmGlobalXCodeGenerator.cxx	2008-09-24 11:34:36.000000000 -0700
+++ cmake-dash-2.6.2/Source/cmGlobalXCodeGenerator.cxx	2008-12-17 18:35:11.000000000 -0800
@@ -2446,8 +2446,16 @@
   {
   std::string proot = root->GetMakefile()->GetCurrentDirectory();
   proot = this->ConvertToRelativeForXCode(proot.c_str());
-  this->RootObject->AddAttribute("projectRoot",
-                                 this->CreateString(proot.c_str()));
+  if(this->XcodeVersion >= 31)
+    {
+    this->RootObject->AddAttribute("projectDirPath", this->CreateString(proot.c_str()));
+    this->RootObject->AddAttribute("projectRoot", this->CreateString(""));
+    }
+  else
+    {
+    this->RootObject->AddAttribute("projectRoot",
+                                   this->CreateString(proot.c_str()));
+    }
   }
   cmXCodeObject* configlist = 
     this->CreateObject(cmXCodeObject::XCConfigurationList);
