Check the QTP0002 policy only if paths are set
It doesn't make sense to disturb users with the policy warning if they don't specify Android paths. Suppress the policy check if Android paths are not set for the target. Fixes: QTBUG-115119 Change-Id: Ice9d0459c01feb505857133bb942b1b6e775e55a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 575b8a7fa289a2e27984a6c322069f9e1b499024) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
023aecc885
commit
3ace2833ea
@ -901,6 +901,28 @@ function(_qt_internal_android_format_deployment_paths target)
|
||||
if(QT_BUILD_STANDALONE_TESTS OR QT_BUILDING_QT)
|
||||
set(android_deployment_paths_policy NEW)
|
||||
else()
|
||||
set(policy_path_properties
|
||||
QT_QML_IMPORT_PATH
|
||||
QT_QML_ROOT_PATH
|
||||
QT_ANDROID_PACKAGE_SOURCE_DIR
|
||||
QT_ANDROID_EXTRA_PLUGINS
|
||||
QT_ANDROID_EXTRA_LIBS
|
||||
)
|
||||
|
||||
# Check if any of paths contains the value and stop the evaluation if all properties are
|
||||
# empty or -NOTFOUND
|
||||
set(has_android_paths FALSE)
|
||||
foreach(prop_name IN LISTS policy_path_properties)
|
||||
get_target_property(prop_value ${target} prop_name)
|
||||
if(prop_value)
|
||||
set(has_android_paths TRUE)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
if(NOT has_android_paths)
|
||||
return()
|
||||
endif()
|
||||
|
||||
__qt_internal_setup_policy(QTP0002 "6.6.0"
|
||||
"Target properties that specify android-specific paths may contain generator\
|
||||
expressions but they must evaluate to valid JSON strings.\
|
||||
|
Loading…
x
Reference in New Issue
Block a user