[Cmake-commits] [cmake-commits] king committed cmGlobalXCodeGenerator.cxx 1.192 1.193

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Jul 7 10:57:34 EDT 2008


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv14954/Source

Modified Files:
	cmGlobalXCodeGenerator.cxx 
Log Message:
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.


Index: cmGlobalXCodeGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.cxx,v
retrieving revision 1.192
retrieving revision 1.193
diff -C 2 -d -r1.192 -r1.193
*** cmGlobalXCodeGenerator.cxx	7 Jul 2008 14:05:29 -0000	1.192
--- cmGlobalXCodeGenerator.cxx	7 Jul 2008 14:57:32 -0000	1.193
***************
*** 2400,2403 ****
--- 2400,2410 ----
    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);



More information about the Cmake-commits mailing list