aboutsummaryrefslogtreecommitdiff
path: root/toolchain/ECMAndroidDeployQt.cmake
diff options
context:
space:
mode:
authorVolker Krause <vkrause@kde.org>2020-03-03 19:46:12 +0100
committerVolker Krause <vkrause@kde.org>2020-03-03 19:47:00 +0100
commitc9ebd3917e59192a9b8655c3dd150064a4ae98b4 (patch)
tree328ae5f1a836f0bce83d445d8dfe3cc23fb39459 /toolchain/ECMAndroidDeployQt.cmake
parent040504da64aa5c623d2ab5907f8d36003ba57e9f (diff)
downloadextra-cmake-modules-c9ebd3917e59192a9b8655c3dd150064a4ae98b4.tar.gz
extra-cmake-modules-c9ebd3917e59192a9b8655c3dd150064a4ae98b4.tar.bz2
Support NDK r20 and Qt 5.14
Summary: This changes from using the toolchain file provided by CMake to using the one provided by the NDK, as even recent CMake can't build successfully with r20. However this is a rather invasive change, the interface and variable names differ. The Qt 5.14 changes are less risky, as most of this is parallel to the support for older versions. Test Plan: Local builds with 5.14/r20, 5.14/r18 work, the Docker SDK isn't tested yet, and there's some remaining issues with 5.13 and older NDKs I don't fully understand yet. The resulting apks with 5.14 install, and work for QQC2 content, but fail to start Kirigami apps. Reviewers: apol Reviewed By: apol Subscribers: flherne, apol, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Maniphest Tasks: T12520 Differential Revision: https://phabricator.kde.org/D26749
Diffstat (limited to 'toolchain/ECMAndroidDeployQt.cmake')
-rw-r--r--toolchain/ECMAndroidDeployQt.cmake14
1 files changed, 12 insertions, 2 deletions
diff --git a/toolchain/ECMAndroidDeployQt.cmake b/toolchain/ECMAndroidDeployQt.cmake
index e565fac4..1121dbfd 100644
--- a/toolchain/ECMAndroidDeployQt.cmake
+++ b/toolchain/ECMAndroidDeployQt.cmake
@@ -3,7 +3,11 @@ find_package(Qt5Core REQUIRED)
function(ecm_androiddeployqt QTANDROID_EXPORTED_TARGET ECM_ADDITIONAL_FIND_ROOT_PATH)
set(EXPORT_DIR "${CMAKE_BINARY_DIR}/${QTANDROID_EXPORTED_TARGET}_build_apk/")
- set(EXECUTABLE_DESTINATION_PATH "${EXPORT_DIR}/libs/${CMAKE_ANDROID_ARCH_ABI}/lib${QTANDROID_EXPORTED_TARGET}.so")
+ if (Qt5Core_VERSION VERSION_LESS 5.14.0)
+ set(EXECUTABLE_DESTINATION_PATH "${EXPORT_DIR}/libs/${CMAKE_ANDROID_ARCH_ABI}/lib${QTANDROID_EXPORTED_TARGET}.so")
+ else()
+ set(EXECUTABLE_DESTINATION_PATH "${EXPORT_DIR}/libs/${CMAKE_ANDROID_ARCH_ABI}/lib${QTANDROID_EXPORTED_TARGET}_${CMAKE_ANDROID_ARCH_ABI}.so")
+ endif()
set(QML_IMPORT_PATHS "")
foreach(prefix ${ECM_ADDITIONAL_FIND_ROOT_PATH})
# qmlimportscanner chokes on symlinks, so we need to resolve those first
@@ -28,8 +32,14 @@ function(ecm_androiddeployqt QTANDROID_EXPORTED_TARGET ECM_ADDITIONAL_FIND_ROOT_
set(EXTRA_PREFIX_DIRS "\"${prefix}\"")
endif()
endforeach()
+
+ if (Qt5Core_VERSION VERSION_LESS 5.14.0)
+ set(_deployment_file_template "${_CMAKE_ANDROID_DIR}/deployment-file.json.in")
+ else()
+ set(_deployment_file_template "${_CMAKE_ANDROID_DIR}/deployment-file-qt514.json.in")
+ endif()
string(TOLOWER "${CMAKE_HOST_SYSTEM_NAME}" _LOWER_CMAKE_HOST_SYSTEM_NAME)
- configure_file("${_CMAKE_ANDROID_DIR}/deployment-file.json.in" "${CMAKE_BINARY_DIR}/${QTANDROID_EXPORTED_TARGET}-deployment.json.in1")
+ configure_file("${_deployment_file_template}" "${CMAKE_BINARY_DIR}/${QTANDROID_EXPORTED_TARGET}-deployment.json.in1")
file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/${QTANDROID_EXPORTED_TARGET}-deployment.json.in2"
INPUT "${CMAKE_BINARY_DIR}/${QTANDROID_EXPORTED_TARGET}-deployment.json.in1")