Check if 'aab' target exists when adding <target>_make_aab as dependency

The global 'aab' target has its own switch QT_NO_GLOBAL_AAB_TARGET
that prevents it from being created. We need to check if 'aab' target
exists before adding <target>_make_aab as a dependency.

Pick-to: 6.3 6.2
Change-Id: Iea569e3b6c7dfb6d0efa60dd2001fb9de161f725
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
bb10
Alexey Edelev 2022-01-26 15:44:09 +01:00
parent c8621da852
commit 4ecbebebf7
1 changed files with 3 additions and 1 deletions

View File

@ -327,9 +327,11 @@ function(qt6_android_add_apk_target target)
endif()
# Make global apk and aab targets depend on the current apk target.
if(TARGET aab)
add_dependencies(aab ${target}_make_aab)
endif()
if(TARGET apk)
add_dependencies(apk ${target}_make_apk)
add_dependencies(aab ${target}_make_aab)
_qt_internal_create_global_apk_all_target_if_needed()
endif()