diff options
author | David Cole <david.cole@kitware.com> | 2010-02-12 19:09:54 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2010-02-12 19:09:54 (GMT) |
commit | e3293f8e4656589493b6921aac592170d884881d (patch) | |
tree | 952409c3a7f03058503ad63aa57fb1b4f2ff3669 /Source | |
parent | bf4d2f6cc7cf20d9d5ba6c82db8210ecb4e2ce6c (diff) | |
download | CMake-e3293f8e4656589493b6921aac592170d884881d.zip CMake-e3293f8e4656589493b6921aac592170d884881d.tar.gz CMake-e3293f8e4656589493b6921aac592170d884881d.tar.bz2 |
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.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 05c6848..1ce274d 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<std::string> vars = this->CurrentMakefile->GetDefinitions(); + for(std::vector<std::string>::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())); |