CMake: Change QT_RESOURCE_TARGET_DEPENDENCY property to be internal

Rename the property to _qt_resource_target_dependency and make sure we
also consider which scope we are getting the source file property from
if the CMake version is recent enough.

Task-number: QTBUG-103470
Change-Id: I755413c91bc0bc9033760a888927b60c470c562b
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit cfd5485d41b2bf519d5b3c5162726cce195782ac)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Alexandru Croitor 2022-05-13 19:14:20 +02:00 committed by Qt Cherry-pick Bot
parent 185f3c26d4
commit bd18956b8b

View File

@ -2090,7 +2090,12 @@ function(_qt_internal_process_resource target resourceName)
string(APPEND qrcContents "${file}</file>\n")
list(APPEND files "${file}")
get_source_file_property(target_dependency ${file} QT_RESOURCE_TARGET_DEPENDENCY)
set(scope_args)
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.18")
set(scope_args TARGET_DIRECTORY ${target})
endif()
get_source_file_property(
target_dependency ${file} ${scope_args} _qt_resource_target_dependency)
if (NOT target_dependency)
list(APPEND resource_dependencies ${file})
else()