From 00a5d9f84922e43a6242392de0270d7a77a04b58 Mon Sep 17 00:00:00 2001 From: Andreas Buhr Date: Wed, 30 Jun 2021 09:57:52 +0200 Subject: [PATCH] Fix building of unit tests for Android in developer build Currently it is not possible to build unit tests for Android in a developer build. This patch fixes this. Fixes: QTBUG-94882 Change-Id: I30ccacc4536032ee3a7fbf05ce90bbbcdb8331a6 Reviewed-by: Alexandru Croitor --- src/corelib/Qt6AndroidMacros.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/corelib/Qt6AndroidMacros.cmake b/src/corelib/Qt6AndroidMacros.cmake index 015ad818258..ddcc1846774 100644 --- a/src/corelib/Qt6AndroidMacros.cmake +++ b/src/corelib/Qt6AndroidMacros.cmake @@ -81,7 +81,13 @@ function(qt6_android_generate_deployment_settings target) endif() endif() - set(qt_android_install_dir "${QT6_INSTALL_PREFIX}") + # Required to build unit tests in developer build + if(QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX) + set(qt_android_install_dir "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}") + else() + set(qt_android_install_dir "${QT6_INSTALL_PREFIX}") + endif() + file(TO_CMAKE_PATH "${qt_android_install_dir}" qt_android_install_dir_native) string(APPEND file_contents " \"qt\": \"${qt_android_install_dir_native}\",\n")