CMake: Mark FILES in qtc_add_resources as SKIP_AUTOGEN

This way we can have source files that will be part of the project
structure as "Resources" and not influence the build via AUTOMOC.

Change-Id: Ie01d893d790cc2a6bac593d51a136992ba2e7fd5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Cristian Adam
2025-04-16 13:35:13 +02:00
parent fe164133f4
commit c5da0bec68

View File

@@ -1241,6 +1241,7 @@ function(qtc_add_resources target resourceName)
list(APPEND resource_dependencies ${file})
target_sources(${target} PRIVATE "${file}")
set_property(SOURCE "${file}" PROPERTY HEADER_FILE_ONLY ON)
set_property(SOURCE "${file}" PROPERTY SKIP_AUTOGEN ON)
endforeach()
source_group("Resources" FILES ${files})