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.
This commit is contained in:
parent
bf4d2f6cc7
commit
e3293f8e46
@ -2758,6 +2758,21 @@ void cmGlobalXCodeGenerator
|
|||||||
this->CreateString(deploymentTarget));
|
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();
|
std::string symroot = root->GetMakefile()->GetCurrentOutputDirectory();
|
||||||
symroot += "/build";
|
symroot += "/build";
|
||||||
buildSettings->AddAttribute("SYMROOT", this->CreateString(symroot.c_str()));
|
buildSettings->AddAttribute("SYMROOT", this->CreateString(symroot.c_str()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user