From 833ec4792d83b1037b46c53a5e382de5cb9b6d58 Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Fri, 18 Nov 2022 00:44:33 +0100 Subject: [PATCH] Unbreak the Android build --- .github/workflows/build_cmake.yml | 1 + CMakeLists.txt | 9 +++++++-- android/AndroidManifest.xml | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index faa60701..ab0a2d18 100755 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -260,6 +260,7 @@ jobs: ${Qt6_DIR}/bin/qt-cmake -G Ninja -DCMAKE_BUILD_TYPE=Release \ -DQT_HOST_PATH=$(readlink -f $Qt6_DIR/../gcc_64) \ -DQT_ANDROID_SDK_BUILD_TOOLS_REVISION=30.0.3 \ + -DQT_ANDROID_TARGET_SDK_VERSION=31 \ -DANDROID_NATIVE_API_LEVEL=23 \ -DQT_ANDROID_BUILD_ALL_ABIS=TRUE \ -DANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk/${{ matrix.config.android_ndk }} \ diff --git a/CMakeLists.txt b/CMakeLists.txt index 10dea9b5..6d5a3a29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -351,13 +351,18 @@ if (ANDROID) QT_ANDROID_VERSION_NAME ${VERSION} ) - if (QT_ANDROID_SDK_BUILD_TOOLS_REVISION) - # Qt bug: this has to be set as a target property to stick + if (QT_ANDROID_SDK_BUILD_TOOLS_REVISION) # this has to be set as a target property to stick set_target_properties(${PROJECT_NAME} PROPERTIES QT_ANDROID_SDK_BUILD_TOOLS_REVISION "${QT_ANDROID_SDK_BUILD_TOOLS_REVISION}" ) endif() + if (QT_ANDROID_TARGET_SDK_VERSION) # this has to be set as a target property to stick + set_target_properties(${PROJECT_NAME} PROPERTIES + QT_ANDROID_TARGET_SDK_VERSION "${QT_ANDROID_TARGET_SDK_VERSION}" + ) + endif() + include(FetchContent) FetchContent_Declare( diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 1cf298f4..1523fa79 100755 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -4,7 +4,7 @@ - +