Skip to content

Commit

Permalink
Add _qt_internal_apk_dependencies if qt_finalize_project is never called
Browse files Browse the repository at this point in the history
With CMake versions < 3.19, we don't have a deferred call of
qt_finalize_project. In qt_add_executable we only have immediate
finalizaton call of qt_finalize_executable, but
qt_android_generate_deployment_settings still depends on the
_qt_internal_apk_dependencies target that is created by qt_finalize_project only.
Create an empty target for the cases when we need to generate
deployment setting but qt_finalize_project is never called.

Pick-to: 6.4
Fixes: QTBUG-106634
Change-Id: If0608cb527eea662e0f9dd41f2751fe49ce433db
Reviewed-by: Alexandru Croitor <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
  • Loading branch information
semlanik committed Dec 9, 2022
1 parent 3cd1971 commit 6294ee0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/corelib/Qt6AndroidMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,12 @@ function(qt6_android_generate_deployment_settings target)
string(APPEND file_contents
" \"extraPrefixDirs\" : [ ${extra_prefix_list} ],\n")

# Create an empty target for the cases when we need to generate deployment setting but
# qt_finalize_project is never called.
if(NOT TARGET _qt_internal_apk_dependencies AND NOT QT_NO_COLLECT_BUILD_TREE_APK_DEPS)
add_custom_target(_qt_internal_apk_dependencies)
endif()

# Extra library paths that could be used as a dependency lookup path by androiddeployqt.
#
# Unlike 'extraPrefixDirs', the 'extraLibraryDirs' key doesn't expect the 'lib' subfolder
Expand Down

0 comments on commit 6294ee0

Please sign in to comment.