summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtPublicPluginHelpers.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/QtPublicPluginHelpers.cmake b/cmake/QtPublicPluginHelpers.cmake
index fed9e4264b..cbe8a5c8aa 100644
--- a/cmake/QtPublicPluginHelpers.cmake
+++ b/cmake/QtPublicPluginHelpers.cmake
@@ -233,6 +233,11 @@ function(__qt_internal_add_static_plugin_init_object_library
CONTENT "${import_content}"
)
+ # CMake versions earlier than 3.18.0 can't find the generated file for some reason,
+ # failing at generation phase.
+ # Explicitly marking the file as GENERATED fixes the issue.
+ set_source_files_properties("${generated_qt_plugin_file_name}" PROPERTIES GENERATED TRUE)
+
__qt_internal_get_static_plugin_init_target_name("${plugin_target}" plugin_init_target)
qt6_add_library("${plugin_init_target}" OBJECT "${generated_qt_plugin_file_name}")