Commit 0ae46321 authored by Gregor Jasny's avatar Gregor Jasny
Browse files

Xcode: Add target property to override explicitFileType

parent 7ecac703
Pipeline #37027 passed with stage
...@@ -294,6 +294,7 @@ Properties on Targets ...@@ -294,6 +294,7 @@ Properties on Targets
/prop_tgt/WIN32_EXECUTABLE /prop_tgt/WIN32_EXECUTABLE
/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS /prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS
/prop_tgt/XCODE_ATTRIBUTE_an-attribute /prop_tgt/XCODE_ATTRIBUTE_an-attribute
/prop_tgt/XCODE_EXPLICIT_FILE_TYPE
/prop_tgt/XCODE_PRODUCT_TYPE /prop_tgt/XCODE_PRODUCT_TYPE
/prop_tgt/XCTEST /prop_tgt/XCTEST
......
XCODE_EXPLICIT_FILE_TYPE
------------------------
Set the Xcode ``explicitFileType`` attribute on its reference to a
target. CMake computes a default based on target type but
can be told explicitly with this property.
See also :prop_tgt:`XCODE_PRODUCT_TYPE`.
...@@ -4,3 +4,5 @@ XCODE_PRODUCT_TYPE ...@@ -4,3 +4,5 @@ XCODE_PRODUCT_TYPE
Set the Xcode ``productType`` attribute on its reference to a Set the Xcode ``productType`` attribute on its reference to a
target. CMake computes a default based on target type but target. CMake computes a default based on target type but
can be told explicitly with this property. can be told explicitly with this property.
See also :prop_tgt:`XCODE_EXPLICIT_FILE_TYPE`.
...@@ -2313,6 +2313,10 @@ const char* cmGlobalXCodeGenerator::GetTargetLinkFlagsVar( ...@@ -2313,6 +2313,10 @@ const char* cmGlobalXCodeGenerator::GetTargetLinkFlagsVar(
const char* cmGlobalXCodeGenerator::GetTargetFileType( const char* cmGlobalXCodeGenerator::GetTargetFileType(
cmGeneratorTarget* target) cmGeneratorTarget* target)
{ {
if (const char* e = target->GetProperty("XCODE_EXPLICIT_FILE_TYPE")) {
return e;
}
switch (target->GetType()) { switch (target->GetType()) {
case cmStateEnums::OBJECT_LIBRARY: case cmStateEnums::OBJECT_LIBRARY:
case cmStateEnums::STATIC_LIBRARY: case cmStateEnums::STATIC_LIBRARY:
......
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