From 7861ae533406899f7908c24ffa457bfd8d5dc7da Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Wed, 27 Nov 2024 11:32:35 -0800 Subject: [PATCH] Add support for override of android min/target sdk versions --- CMakeLists.txt | 4 ++-- cmake/CustomOptions.cmake | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d438c55388..d6d802b4a41 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -419,8 +419,8 @@ elseif(ANDROID) set_target_properties(${PROJECT_NAME} PROPERTIES # QT_ANDROID_ABIS ${ANDROID_ABI} - QT_ANDROID_MIN_SDK_VERSION 25 - QT_ANDROID_TARGET_SDK_VERSION 35 + QT_ANDROID_MIN_SDK_VERSION ${QGC_QT_ANDROID_MIN_SDK_VERSION} + QT_ANDROID_TARGET_SDK_VERSION ${QGC_QT_ANDROID_TARGET_SDK_VERSION} QT_ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_SOURCE_DIR}/android QT_ANDROID_VERSION_NAME ${CMAKE_PROJECT_VERSION} QT_ANDROID_VERSION_CODE ${ANDROID_VERSION_CODE} diff --git a/cmake/CustomOptions.cmake b/cmake/CustomOptions.cmake index 71dc8eefc62..5d2ba7dbd8a 100644 --- a/cmake/CustomOptions.cmake +++ b/cmake/CustomOptions.cmake @@ -25,6 +25,9 @@ option(QGC_ENABLE_QT_VIDEOSTREAMING "Enable QtMultimedia Video Backend" OFF) # Q set(QGC_MAVLINK_GIT_REPO "https://github.com/mavlink/c_library_v2.git" CACHE STRING "URL to MAVLink Git Repo") set(QGC_MAVLINK_GIT_TAG "4db2f67156d996eae90ef437a73353468d850407" CACHE STRING "Tag of MAVLink Git Repo") +set(QGC_QT_ANDROID_MIN_SDK_VERSION "26" CACHE STRING "Android Min SDK Version") +set(QGC_QT_ANDROID_TARGET_SDK_VERSION "35" CACHE STRING "Android Target SDK Version") + # MacOS set(QGC_BUNDLE_ID "org.qgroundcontrol.QGroundControl" CACHE STRING "MacOS Bundle ID") # MACOS set(QGC_MACOS_ICON_PATH "${CMAKE_SOURCE_DIR}/deploy/mac" CACHE PATH "MacOS Icon Path") # MACOS