diff options
-rw-r--r-- | src/corelib/Qt6CoreMacros.cmake | 1 | ||||
-rw-r--r-- | tests/auto/cmake/CMakeLists.txt | 3 |
2 files changed, 2 insertions, 2 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}) diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt index 45991a9058..996fb979cf 100644 --- a/tests/auto/cmake/CMakeLists.txt +++ b/tests/auto/cmake/CMakeLists.txt @@ -210,8 +210,7 @@ _qt_internal_test_expect_pass(test_moc_macro_target) # The modification of TARGET_OBJECTS needs the following change in cmake # https://gitlab.kitware.com/cmake/cmake/commit/93c89bc75ceee599ba7c08b8fe1ac5104942054f -# FIXME: Doesn't currently work with namespaced Qt builds QTBUG-85620 -# _qt_internal_test_expect_pass(test_add_big_resource) +_qt_internal_test_expect_pass(test_add_big_resource) # With earlier CMake versions, this test would simply run moc multiple times and lead to: # /usr/bin/ld: error: CMakeFiles/mywidget.dir/mywidget_automoc.cpp.o: multiple definition of 'MyWidget::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)' |