summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2021-01-18 11:49:52 +0100
committerAlexey Edelev <alexey.edelev@qt.io>2021-01-19 14:17:55 +0100
commitfd5006eb4835a1d72d0d3ab3d5b6491d4697eaeb (patch)
tree2b3b3b2e3c5186c0ff3c3f8b06bfc401cf1119ca /src
parent0392dce4f0a2093987ab45c48f0748c3dd97e7fc (diff)
Fix qt_add_big_resources with namespace builds
Add INTERFACE_COMPILE_DEFINITIONS of Qt6::Core to generated rcc object libraries. This propagates QT_NAMESPACE definition to the object library. Fixes: QTBUG-85620 Change-Id: I252d1aaee7b19a49bc321fdd271a5d85a34bf67f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/Qt6CoreMacros.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake
index 7a8fe80671..2a178de16c 100644
--- a/src/corelib/Qt6CoreMacros.cmake
+++ b/src/corelib/Qt6CoreMacros.cmake
@@ -396,6 +396,7 @@ function(qt6_add_big_resources outfiles )
VERBATIM)
add_custom_target(big_resources_${outfilename} ALL DEPENDS ${tmpoutfile})
add_library(rcc_object_${outfilename} OBJECT ${tmpoutfile})
+ target_compile_definitions(rcc_object_${outfilename} PUBLIC "$<TARGET_PROPERTY:Qt6::Core,INTERFACE_COMPILE_DEFINITIONS>")
set_target_properties(rcc_object_${outfilename} PROPERTIES AUTOMOC OFF)
set_target_properties(rcc_object_${outfilename} PROPERTIES AUTOUIC OFF)
add_dependencies(rcc_object_${outfilename} big_resources_${outfilename})