summaryrefslogtreecommitdiffstats
path: root/src/corelib/Qt6CoreMacros.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/Qt6CoreMacros.cmake')
-rw-r--r--src/corelib/Qt6CoreMacros.cmake22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake
index 622505689a..4c85873f6b 100644
--- a/src/corelib/Qt6CoreMacros.cmake
+++ b/src/corelib/Qt6CoreMacros.cmake
@@ -1770,7 +1770,11 @@ macro(_qt_internal_get_add_plugin_keywords option_args single_args multi_args)
SHARED
)
set(${single_args}
+ # TODO: For backward compatibility / transitional use only, remove once all repos no longer
+ # use it
TYPE
+
+ PLUGIN_TYPE
CLASS_NAME
OUTPUT_NAME
)
@@ -1800,6 +1804,20 @@ function(qt6_add_plugin target)
unset(arg_CLASSNAME)
endif()
+ # Handle the inconsistent TYPE/PLUGIN_TYPE keyword naming between commands
+ if(arg_TYPE)
+ if(arg_PLUGIN_TYPE AND NOT arg_TYPE STREQUAL arg_PLUGIN_TYPE)
+ message(FATAL_ERROR
+ "Both TYPE and PLUGIN_TYPE were given and were different. "
+ "Only one of the two should be used."
+ )
+ endif()
+ message(AUTHOR_WARNING
+ "The TYPE keyword is deprecated and will be removed soon. Please use PLUGIN_TYPE instead.")
+ set(arg_PLUGIN_TYPE "${arg_TYPE}")
+ unset(arg_TYPE)
+ endif()
+
if(arg_STATIC AND arg_SHARED)
message(FATAL_ERROR
"Both STATIC and SHARED options were given. Only one of the two should be used."
@@ -1844,13 +1862,13 @@ function(qt6_add_plugin target)
if (ANDROID)
set_target_properties(${target}
PROPERTIES
- LIBRARY_OUTPUT_NAME "plugins_${arg_TYPE}_${output_name}"
+ LIBRARY_OUTPUT_NAME "plugins_${arg_PLUGIN_TYPE}_${output_name}"
)
endif()
# Derive the class name from the target name if it's not explicitly specified.
set(plugin_class_name "")
- if (NOT "${arg_TYPE}" STREQUAL "qml_plugin")
+ if (NOT "${arg_PLUGIN_TYPE}" STREQUAL "qml_plugin")
if (NOT arg_CLASS_NAME)
set(plugin_class_name "${target}")
else()