summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2021-06-07 17:14:39 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2021-06-08 22:37:50 +0200
commit8b8679f73d6cfb513141cc0a9f4925a64ca19455 (patch)
tree393edd500228f804869f42dc4ddeb77a06722725 /CMakeLists.txt
parent9b625ec89dd796f7eff16aedef6aa23b6319a58d (diff)
CMake: Fix global 'apk' target to actually build all apks
This means calling 'ninja apk' in a user project with multiple android applications will build all their respective apks. For user projects, make the 'apk' target part of the global 'ALL' target, so that a regular 'ninja' call implies the 'apk' target. We don't do it currently for Qt builds, because certain test executable apks fail to build. Add a QT_NO_GLOBAL_APK_TARGET_PART_OF_ALL variable to allow removing the global apk target from the 'all' target. Pick-to: 6.1 Task-number: QTBUG-94264 Change-Id: I171b9da50eb7d670176704bd26dc1c492118b434 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8462007ae5..334c2496c7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,7 +106,10 @@ if(NOT QT_BUILD_STANDALONE_TESTS)
include(src/corelib/Qt6CoreMacros.cmake)
# Needed when building qtbase for android.
- include(src/corelib/Qt6AndroidMacros.cmake)
+ if(ANDROID)
+ include(src/corelib/Qt6AndroidMacros.cmake)
+ _qt_internal_create_global_apk_target()
+ endif()
if(WASM)
# Needed when building for WebAssembly.