diff options
author | Brad King <brad.king@kitware.com> | 2016-12-12 19:21:23 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-12-12 19:21:23 (GMT) |
commit | 55ff3c78b3d0d08cdbc6dea700e2add6a64c988b (patch) | |
tree | 154ec774589266369547c83ade1fc0caf97d25c2 | |
parent | ce71bd9505a46d7350c0e256f2d8f4f183d1c9fa (diff) | |
parent | 9ac0c3936e612ec4780ea96d298095e2ad907fef (diff) | |
download | CMake-55ff3c78b3d0d08cdbc6dea700e2add6a64c988b.zip CMake-55ff3c78b3d0d08cdbc6dea700e2add6a64c988b.tar.gz CMake-55ff3c78b3d0d08cdbc6dea700e2add6a64c988b.tar.bz2 |
Merge topic 'xcode-message-extension'
9ac0c393 Help: Add notes for topic 'xcode-message-extension'
0ae46321 Xcode: Add target property to override explicitFileType
7ecac703 Xcode: Add target property to override productType
-rw-r--r-- | Help/manual/cmake-properties.7.rst | 2 | ||||
-rw-r--r-- | Help/prop_tgt/XCODE_EXPLICIT_FILE_TYPE.rst | 8 | ||||
-rw-r--r-- | Help/prop_tgt/XCODE_PRODUCT_TYPE.rst | 8 | ||||
-rw-r--r-- | Help/release/dev/xcode-message-extension.rst | 7 | ||||
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 8 |
5 files changed, 33 insertions, 0 deletions
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index e55524c..70bd279 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -294,6 +294,8 @@ 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 .. _`Test Properties`: 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 new file mode 100644 index 0000000..f4ef5c0 --- /dev/null +++ b/Help/prop_tgt/XCODE_PRODUCT_TYPE.rst @@ -0,0 +1,8 @@ +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/Help/release/dev/xcode-message-extension.rst b/Help/release/dev/xcode-message-extension.rst new file mode 100644 index 0000000..11c0702 --- /dev/null +++ b/Help/release/dev/xcode-message-extension.rst @@ -0,0 +1,7 @@ +xcode-message-extension +----------------------- + +* New :prop_tgt:`XCODE_PRODUCT_TYPE` and :prop_tgt:`XCODE_EXPLICIT_FILE_TYPE` + target properties were created to tell the :generator:`Xcode` generator + to use custom values of the corresponding attributes for a target in the + generated Xcode project. diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 50197c9..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: @@ -2340,6 +2344,10 @@ const char* cmGlobalXCodeGenerator::GetTargetFileType( const char* cmGlobalXCodeGenerator::GetTargetProductType( cmGeneratorTarget* target) { + if (const char* e = target->GetProperty("XCODE_PRODUCT_TYPE")) { + return e; + } + switch (target->GetType()) { case cmStateEnums::OBJECT_LIBRARY: case cmStateEnums::STATIC_LIBRARY: |