diff options
author | Brad King <brad.king@kitware.com> | 2008-07-07 14:57:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-07-07 14:57:32 (GMT) |
commit | e225a377b9d650a1320c8c5354dfefca76405e3d (patch) | |
tree | 63074910fa898d69c38cb4a1925dde701659019f /Source/cmGlobalXCodeGenerator.cxx | |
parent | 97e658c571432757902f3333bb15aab90156dc9f (diff) | |
download | CMake-e225a377b9d650a1320c8c5354dfefca76405e3d.zip CMake-e225a377b9d650a1320c8c5354dfefca76405e3d.tar.gz CMake-e225a377b9d650a1320c8c5354dfefca76405e3d.tar.bz2 |
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.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index b2afa7f..384098a 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2399,6 +2399,13 @@ void cmGlobalXCodeGenerator this->RootObject->AddAttribute("buildStyles", listObjs); this->RootObject->AddAttribute("hasScannedForEncodings", 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 = this->CreateObject(cmXCodeObject::XCConfigurationList); cmXCodeObject* buildConfigurations = |