From e3293f8e4656589493b6921aac592170d884881d Mon Sep 17 00:00:00 2001 From: David Cole Date: Fri, 12 Feb 2010 14:09:54 -0500 Subject: [PATCH] Fix for issue #9125 - invent CMAKE_XCODE_ATTRIBUTE_* variable mechanism. If there are variables that begin with CMAKE_XCODE_ATTRIBUTE_ then add corresponding attributes into the generated Xcode project file. --- Source/cmGlobalXCodeGenerator.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 05c684895..1ce274d41 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2758,6 +2758,21 @@ void cmGlobalXCodeGenerator this->CreateString(deploymentTarget)); } + // put this last so it can override existing settings + // Convert "CMAKE_XCODE_ATTRIBUTE_*" properties directly. + { + std::vector vars = this->CurrentMakefile->GetDefinitions(); + for(std::vector::const_iterator i = vars.begin(); + i != vars.end(); ++i) + { + if(i->find("CMAKE_XCODE_ATTRIBUTE_") == 0) + { + buildSettings->AddAttribute(i->substr(22).c_str(), + this->CreateString(this->CurrentMakefile->GetDefinition(i->c_str()))); + } + } + } + std::string symroot = root->GetMakefile()->GetCurrentOutputDirectory(); symroot += "/build"; buildSettings->AddAttribute("SYMROOT", this->CreateString(symroot.c_str()));