ENH: Add projectRoot to Xcode projects

- This attribute points Xcode at the source tree.
  - Xcode 3 wants this to be set always.
  - See bug #7044.
This commit is contained in:
Brad King 2008-07-07 10:57:32 -04:00
parent 97e658c571
commit e225a377b9
1 changed files with 7 additions and 0 deletions

View File

@ -2399,6 +2399,13 @@ void cmGlobalXCodeGenerator
this->RootObject->AddAttribute("buildStyles", listObjs); this->RootObject->AddAttribute("buildStyles", listObjs);
this->RootObject->AddAttribute("hasScannedForEncodings", this->RootObject->AddAttribute("hasScannedForEncodings",
this->CreateString("0")); this->CreateString("0"));
// Point Xcode at the top of the source tree.
{
std::string proot = root->GetMakefile()->GetCurrentDirectory();
proot = this->ConvertToRelativeForXCode(proot.c_str());
this->RootObject->AddAttribute("projectRoot",
this->CreateString(proot.c_str()));
}
cmXCodeObject* configlist = cmXCodeObject* configlist =
this->CreateObject(cmXCodeObject::XCConfigurationList); this->CreateObject(cmXCodeObject::XCConfigurationList);
cmXCodeObject* buildConfigurations = cmXCodeObject* buildConfigurations =