From 9378db0f78a276ef9a69def491a8f21257fb2bf4 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Mon, 8 Jan 2024 14:09:16 +0100 Subject: [PATCH] Disable AUTOGEN for resource object targets It looks like resource object targets don't need AUTOMOC as well as other AUTOGEN tools. The only source file skips autogen explicitly, but AUTOMOC requirement is added to the resource object targets anyway. This disables all AUTOGEN related properties explicitly for all resource object targets. The problem occurs when building top-level Qt with the static library that uses resources in tree. Pick-to: 6.5 6.2 Change-Id: I5c968a3e34c881e7fbc5589626ab02b3b1e53968 Reviewed-by: Joerg Bornemann (cherry picked from commit dd4c14104cfab6330b31937acf2b2f120ef940a0) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit 273f1ffbf63ddc115e52b443fe20c2e88a6bcb8f) --- src/corelib/Qt6CoreMacros.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index 5b22d934640..72ba8769e26 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -1724,6 +1724,11 @@ function(__qt_propagate_generated_resource target resource_name generated_source set(resource_target "${target}_resources_${resource_count}") add_library("${resource_target}" OBJECT "${generated_source_code}") + set_target_properties(${resource_target} PROPERTIES + AUTOMOC FALSE + AUTOUIC FALSE + AUTORCC FALSE + ) target_compile_definitions("${resource_target}" PRIVATE "$" )