From 5033d712b73df05b6bda1cddc6bf5a2b9688afb1 Mon Sep 17 00:00:00 2001 From: Volker Krause Date: Mon, 5 Apr 2021 16:08:32 +0200 Subject: Add a way to pass additional arguments to androiddeployqt We need this to pass the --release option for binary factory release builds. An alternative approach would be to set that here automatically depending on the CMake build type. Since that however ends up producing unsigned and thus not immediately usable APKs (or would need a whole set of extra arguments for proper signing) I'm not sure whether that's most convenient for local use. --- toolchain/ECMAndroidDeployQt.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolchain/ECMAndroidDeployQt.cmake b/toolchain/ECMAndroidDeployQt.cmake index 65b68c67..67651524 100644 --- a/toolchain/ECMAndroidDeployQt.cmake +++ b/toolchain/ECMAndroidDeployQt.cmake @@ -115,7 +115,7 @@ function(ecm_androiddeployqt QTANDROID_EXPORTED_TARGET ECM_ADDITIONAL_FIND_ROOT_ COMMAND cmake -E copy "$" "${EXECUTABLE_DESTINATION_PATH}" COMMAND LANG=C cmake "-DTARGET=$" -P ${_CMAKE_ANDROID_DIR}/hasMainSymbol.cmake COMMAND LANG=C cmake -DINPUT_FILE="${QTANDROID_EXPORTED_TARGET}-deployment.json.in2" -DOUTPUT_FILE="${QTANDROID_EXPORTED_TARGET}-deployment.json" "-DTARGET=$" "-DOUTPUT_DIR=$" "-DEXPORT_DIR=${CMAKE_INSTALL_PREFIX}" "-DECM_ADDITIONAL_FIND_ROOT_PATH=\"${ECM_ADDITIONAL_FIND_ROOT_PATH}\"" "-DANDROID_EXTRA_LIBS=\"${ANDROID_EXTRA_LIBS}\"" "-DUSE_LLVM=\"${USE_LLVM}\"" -P ${_CMAKE_ANDROID_DIR}/specifydependencies.cmake - COMMAND $/androiddeployqt --gradle --input "${QTANDROID_EXPORTED_TARGET}-deployment.json" --apk "${ANDROID_APK_OUTPUT_DIR}/${QTANDROID_EXPORTED_TARGET}-${CMAKE_ANDROID_ARCH_ABI}.apk" --output "${EXPORT_DIR}" --android-platform android-${ANDROID_SDK_COMPILE_API} --deployment bundled ${arguments} + COMMAND $/androiddeployqt ${ANDROIDDEPLOYQT_EXTRA_ARGS} --gradle --input "${QTANDROID_EXPORTED_TARGET}-deployment.json" --apk "${ANDROID_APK_OUTPUT_DIR}/${QTANDROID_EXPORTED_TARGET}-${CMAKE_ANDROID_ARCH_ABI}.apk" --output "${EXPORT_DIR}" --android-platform android-${ANDROID_SDK_COMPILE_API} --deployment bundled ${arguments} ) # --android-platform above is only available as a command line option # This specifies the actual version of the SDK files to use, and -- cgit v1.2.1