Fix the support of genex's when generating Android deployment settings

Add GENEX_EVAL when proxying target properties that needs to be written
to Android deployment settings.
If properties that are proxied in the
_qt_internal_android_format_deployment_paths function contain genex's
they are not evaluated when file(GENERATE is called. So the resulting
Android deployment settings contain unevaluated generator expressions
but not the values of the corresponding properties. Generator
expressions like TARGET_FILE or TARGET_FILE_DIR can be used to
specify paths to the plugins or libs using QT_ANDROID_EXTRA_PLUGINS
or QT_ANDROID_EXTRA_LIBS properties.

Note: The support is added for Qt build and Qt tests only.

Pick-to: 6.3
Change-Id: Ifdfd5d855e5a504fed55617786762a0c12b27773
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Alexey Edelev 2022-03-25 13:51:46 +01:00
parent 80b6bcc385
commit f641dfe451

View File

@ -763,12 +763,16 @@ function(_qt_internal_android_format_deployment_paths target)
# windows paths when setting QT_* properties below, so their values are used as is when # windows paths when setting QT_* properties below, so their values are used as is when
# generating deployment settings. # generating deployment settings.
set_target_properties(${target} PROPERTIES set_target_properties(${target} PROPERTIES
_qt_native_qml_import_paths "$<TARGET_PROPERTY:${target},QT_QML_IMPORT_PATH>" _qt_native_qml_import_paths
_qt_android_native_qml_root_paths "$<TARGET_PROPERTY:${target},QT_QML_ROOT_PATH>" "$<GENEX_EVAL:$<TARGET_PROPERTY:${target},QT_QML_IMPORT_PATH>>"
_qt_android_native_qml_root_paths
"$<GENEX_EVAL:$<TARGET_PROPERTY:${target},QT_QML_ROOT_PATH>>"
_qt_android_native_package_source_dir _qt_android_native_package_source_dir
"$<TARGET_PROPERTY:${target},QT_ANDROID_PACKAGE_SOURCE_DIR>" "$<GENEX_EVAL:$<TARGET_PROPERTY:${target},QT_ANDROID_PACKAGE_SOURCE_DIR>>"
_qt_android_native_extra_plugins "$<TARGET_PROPERTY:${target},QT_ANDROID_EXTRA_PLUGINS>" _qt_android_native_extra_plugins
_qt_android_native_extra_libs "$<TARGET_PROPERTY:${target},QT_ANDROID_EXTRA_LIBS>" "$<GENEX_EVAL:$<TARGET_PROPERTY:${target},QT_ANDROID_EXTRA_PLUGINS>>"
_qt_android_native_extra_libs
"$<GENEX_EVAL:$<TARGET_PROPERTY:${target},QT_ANDROID_EXTRA_LIBS>>"
) )
else() else()
# User projects still may use windows paths inside the QT_* properties below, with # User projects still may use windows paths inside the QT_* properties below, with