diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index 26ab044856..7b901b3c09 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -1175,7 +1175,10 @@ function(_qt_internal_process_resource target resourceName) # string(APPEND qrcContents " \n\n") - file(GENERATE OUTPUT "${generatedResourceFile}" CONTENT "${qrcContents}") + file(WRITE "${generatedResourceFile}.in" "${qrcContents}") + configure_file("${generatedResourceFile}.in" "${generatedResourceFile}") + + set_property(TARGET ${target} APPEND PROPERTY _qt_generated_qrc_files "${generatedResourceFile}") set(rccArgs --name "${newResourceName}" --output "${generatedSourceCode}" "${generatedResourceFile}")