CMake: Evaluate genexes for extra deploy file paths

Since d08fa86e63448377dde4297bc94680a9d7daaaeb we add extra deploy
files with target file information.

The file paths contain a $<CONFIG> genex to handle multi-config
builds. These were not evaluated in the DeploySupport file content.

Add a TARGET_GENEX_EVAL genex around the TARGET_PROPERTY genex, to
ensure they do get evaluated.

This avoids an error like:
 include could not find requested file:
   C:/Users/qt/work/qt/qtbase_build/.qt/QtDeployTargets-$.cmake

Amends d08fa86e63448377dde4297bc94680a9d7daaaeb

Task-number: QTBUG-117948
Task-number: QTBUG-118153
Change-Id: Ia3898c31d80b82bdb25fe733fc73b45c6d689ed0
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit a6965441d72a1e453d80d0083c1a3fd6803d96bb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Alexandru Croitor 2024-03-19 12:09:46 +01:00 committed by Qt Cherry-pick Bot
parent ed8b651143
commit d7b4937e24

View File

@ -2871,7 +2871,7 @@ function(_qt_internal_setup_deploy_support)
DIRECTORY [[${CMAKE_SOURCE_DIR}]]
CALL _qt_internal_write_target_deploy_info [[${targets_file}]])"
)
set_property(TARGET ${target} PROPERTY _qt_deploy_support_files "${targets_file}")
_qt_internal_add_deploy_support("${targets_file}")
endif()
# Make sure to look under the Qt bin dir with find_program, rather than randomly picking up
@ -3069,7 +3069,7 @@ set(__QT_DEPLOY_QT_DEBUG_POSTFIX \"${QT6_DEBUG_POSTFIX}\")
# Define the CMake commands to be made available during deployment.
set(__qt_deploy_support_files
\"$<JOIN:$<TARGET_PROPERTY:${target},_qt_deploy_support_files>,\"
\"$<JOIN:$<TARGET_GENEX_EVAL:${target},$<TARGET_PROPERTY:${target},_qt_deploy_support_files>>,\"
\">\"
)
foreach(__qt_deploy_support_file IN LISTS __qt_deploy_support_files)