mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-08 07:10:12 -05:00
Xcode: Add target property to override productType
This commit is contained in:
@@ -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_PRODUCT_TYPE
|
||||||
/prop_tgt/XCTEST
|
/prop_tgt/XCTEST
|
||||||
|
|
||||||
.. _`Test Properties`:
|
.. _`Test Properties`:
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
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.
|
||||||
@@ -2340,6 +2340,10 @@ const char* cmGlobalXCodeGenerator::GetTargetFileType(
|
|||||||
const char* cmGlobalXCodeGenerator::GetTargetProductType(
|
const char* cmGlobalXCodeGenerator::GetTargetProductType(
|
||||||
cmGeneratorTarget* target)
|
cmGeneratorTarget* target)
|
||||||
{
|
{
|
||||||
|
if (const char* e = target->GetProperty("XCODE_PRODUCT_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:
|
||||||
|
|||||||
Reference in New Issue
Block a user