CMake: Add Android's prepare_apk_dir target to ALL
Since Qt Creator uses androiddeployqt custom commands it still needs a step to prepare the apk dir before building it, so add this to ALL to avoid having to call it manually in creator. Pick-to: 6.1 Change-Id: I0a2816244589e9b296a326fcc1abf8c08aabfea7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
ed431caa27
commit
7134843793
@ -302,10 +302,10 @@ function(qt6_android_add_apk_target target)
|
||||
set(apk_intermediate_file_path "${apk_intermediate_dir}/${apk_file_name}")
|
||||
|
||||
# This target is used by Qt Creator's Android support.
|
||||
add_custom_target(${target}_prepare_apk_dir
|
||||
add_custom_target(${target}_prepare_apk_dir ALL
|
||||
DEPENDS ${target}
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E copy $<TARGET_FILE:${target}>
|
||||
-E copy_if_different $<TARGET_FILE:${target}>
|
||||
"${apk_final_dir}/libs/${CMAKE_ANDROID_ARCH_ABI}/$<TARGET_FILE_NAME:${target}>"
|
||||
COMMENT "Copying ${target} binary to apk folder"
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user