Qt 6.11 is out! See what's new in the release
blog
Nested Android CMake project - how to set androiddeployqt --input parameter
-
Consider hierarchical CMake project (for Android) with the 'top' project pointing to an actual app's folder:
root
|-- CMakeLists.txt (top)
|-- app
|---- CMakeLists.txt (app)# CMakeLists.txt top: cmake_minimum_required(VERSION 3.14) project(Top) add_subdirectory(app)# CMakeLists.txt app: cmake_minimum_required(VERSION 3.14) project(MyApp) ... qt6_finalize_executable(MyApp)Everything builds as expected (from the QtCreator). However, hitting the F5 for deploying (and running) fails:
No target architecture defined in json fileOne solution is to copy the android-AndroidApp-deployment-settings.json from the app folder to the root.
Is there a more elegant way by telling the androiddeployqt where to find the deployment-settings.json file (i.e. how to set the --input parameter for the androiddeployqt)? I've played with qt_android_generate_deployment_settings and qt_android_add_apk_target with no avail....