From 790d380f8b5b46d135e5c9c25bdfe13b7e5c4b05 Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Tue, 22 Oct 2019 16:19:13 +0200 Subject: Add custom targets to generate Android APK This patch adds two custom targets to generate android apks. The targets are named ${TARGET}_prepare_apk_dir and ${TARGET}_make_apk. The first one insures the binary is copied to the right location and the latter invokes androiddeployqt on the apk directory. Change-Id: I8152cef387b50ec03ee2bfd92b56910a6f22754c Reviewed-by: Alexandru Croitor --- src/corelib/Qt6CoreMacros.cmake | 1 + src/plugins/platforms/android/CMakeLists.txt | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index d1001ad2af..dbc9cdb163 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -423,6 +423,7 @@ function(add_qt_gui_executable target) if(ANDROID) qt_android_generate_deployment_settings("${target}") + qt_android_add_apk_target("${target}") endif() endfunction() diff --git a/src/plugins/platforms/android/CMakeLists.txt b/src/plugins/platforms/android/CMakeLists.txt index b6a92fa6ed..bcc3538bcc 100644 --- a/src/plugins/platforms/android/CMakeLists.txt +++ b/src/plugins/platforms/android/CMakeLists.txt @@ -61,11 +61,11 @@ add_qt_plugin(qtforandroid jnigraphics # special case begin INSTALL_DIRECTORY - plugins/platforms/android + plugins/platforms OUTPUT_DIRECTORY - plugins/platforms/android + plugins/platforms ARCHIVE_INSTALL_DIRECTORY - plugins/platforms/android + plugins/platforms # special case end ) -- cgit v1.2.3