diff options
author | Gregor Jasny <gjasny@googlemail.com> | 2016-12-03 22:45:55 (GMT) |
---|---|---|
committer | Gregor Jasny <gjasny@googlemail.com> | 2016-12-03 23:13:51 (GMT) |
commit | 0ae4632119ba5300995ec5ddd5513a44bfd2a198 (patch) | |
tree | 4254f92ed3932f0749b73dfbe96a343c2e4a5c32 | |
parent | 7ecac703cec8bde71f8d11c1a8fa34bfa077edee (diff) | |
download | CMake-0ae4632119ba5300995ec5ddd5513a44bfd2a198.zip CMake-0ae4632119ba5300995ec5ddd5513a44bfd2a198.tar.gz CMake-0ae4632119ba5300995ec5ddd5513a44bfd2a198.tar.bz2 |
Xcode: Add target property to override explicitFileType
-rw-r--r-- | Help/manual/cmake-properties.7.rst | 1 | ||||
-rw-r--r-- | Help/prop_tgt/XCODE_EXPLICIT_FILE_TYPE.rst | 8 | ||||
-rw-r--r-- | Help/prop_tgt/XCODE_PRODUCT_TYPE.rst | 2 | ||||
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 4 |
4 files changed, 15 insertions, 0 deletions
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 292a85b..70bd279 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -294,6 +294,7 @@ Properties on Targets /prop_tgt/WIN32_EXECUTABLE /prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS /prop_tgt/XCODE_ATTRIBUTE_an-attribute + /prop_tgt/XCODE_EXPLICIT_FILE_TYPE /prop_tgt/XCODE_PRODUCT_TYPE /prop_tgt/XCTEST diff --git a/Help/prop_tgt/XCODE_EXPLICIT_FILE_TYPE.rst b/Help/prop_tgt/XCODE_EXPLICIT_FILE_TYPE.rst new file mode 100644 index 0000000..dc92902 --- /dev/null +++ b/Help/prop_tgt/XCODE_EXPLICIT_FILE_TYPE.rst @@ -0,0 +1,8 @@ +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`. diff --git a/Help/prop_tgt/XCODE_PRODUCT_TYPE.rst b/Help/prop_tgt/XCODE_PRODUCT_TYPE.rst index 1fbf001..f4ef5c0 100644 --- a/Help/prop_tgt/XCODE_PRODUCT_TYPE.rst +++ b/Help/prop_tgt/XCODE_PRODUCT_TYPE.rst @@ -4,3 +4,5 @@ XCODE_PRODUCT_TYPE Set the Xcode ``productType`` 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_EXPLICIT_FILE_TYPE`. diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 82ca7a8..736aa91 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2313,6 +2313,10 @@ const char* cmGlobalXCodeGenerator::GetTargetLinkFlagsVar( const char* cmGlobalXCodeGenerator::GetTargetFileType( cmGeneratorTarget* target) { + if (const char* e = target->GetProperty("XCODE_EXPLICIT_FILE_TYPE")) { + return e; + } + switch (target->GetType()) { case cmStateEnums::OBJECT_LIBRARY: case cmStateEnums::STATIC_LIBRARY: |