Commit 811f6c82 authored by Bekenn's avatar Bekenn Committed by Brad King
Browse files

Xcode: Add XCODE_FILE_ATTRIBUTES source file property

This adds values to the ATTRIBUTES list in PBXBuildFile settings.
parent ef494edf
...@@ -344,6 +344,7 @@ Properties on Source Files ...@@ -344,6 +344,7 @@ Properties on Source Files
/prop_sf/VS_XAML_TYPE /prop_sf/VS_XAML_TYPE
/prop_sf/WRAP_EXCLUDE /prop_sf/WRAP_EXCLUDE
/prop_sf/XCODE_EXPLICIT_FILE_TYPE /prop_sf/XCODE_EXPLICIT_FILE_TYPE
/prop_sf/XCODE_FILE_ATTRIBUTES
/prop_sf/XCODE_LAST_KNOWN_FILE_TYPE /prop_sf/XCODE_LAST_KNOWN_FILE_TYPE
.. _`Cache Entry Properties`: .. _`Cache Entry Properties`:
......
XCODE_FILE_ATTRIBUTES
---------------------
Add values to the Xcode ``ATTRIBUTES`` setting on its reference to a
source file. Among other things, this can be used to set the role on
a mig file::
set_source_files_properties(defs.mig
PROPERTIES
XCODE_FILE_ATTRIBUTES "Client;Server"
)
...@@ -714,6 +714,20 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile( ...@@ -714,6 +714,20 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile(
} }
} }
// Add user-specified file attributes.
const char* extraFileAttributes = sf->GetProperty("XCODE_FILE_ATTRIBUTES");
if (extraFileAttributes) {
// Expand the list of attributes.
std::vector<std::string> attributes;
cmSystemTools::ExpandListArgument(extraFileAttributes, attributes);
// Store the attributes.
for (std::vector<std::string>::const_iterator ai = attributes.begin();
ai != attributes.end(); ++ai) {
attrs->AddObject(this->CreateString(*ai));
}
}
settings->AddAttributeIfNotEmpty("ATTRIBUTES", attrs); settings->AddAttributeIfNotEmpty("ATTRIBUTES", attrs);
// Add the fileRef to the top level Resources group/folder if it is not // Add the fileRef to the top level Resources group/folder if it is not
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment