CMake: Expose generated resource files to IDEs

Add generated qrc files to source of the target so they will be
displayed (and reachable by Follow Symbol in QtCreator) under
the '<Build Directory>/.rcc' node in the Project Tree of QtCreator.

Fixes: QTCREATORBUG-28604
Change-Id: I0c56e168de03027ec2981cfa0bceb8f10a8d71b2
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Xavier BESSON 2022-12-19 17:59:54 +01:00 committed by Jörg Bornemann
parent 348911a4e7
commit 30efb24d45

View File

@ -1864,6 +1864,7 @@ function(_qt_internal_process_resource target resourceName)
return()
endif()
set(generatedResourceFile "${CMAKE_CURRENT_BINARY_DIR}/.rcc/${resourceName}.qrc")
_qt_internal_expose_source_file_to_ide(${target} ${generatedResourceFile})
# Generate .qrc file: