summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmake/QtPlatformAndroid.cmake12
-rwxr-xr-xutil/cmake/pro2cmake.py10
2 files changed, 1 insertions, 21 deletions
diff --git a/cmake/QtPlatformAndroid.cmake b/cmake/QtPlatformAndroid.cmake
index ee3214e907b..d5e86ff72d0 100644
--- a/cmake/QtPlatformAndroid.cmake
+++ b/cmake/QtPlatformAndroid.cmake
@@ -23,18 +23,6 @@ if (NOT IS_DIRECTORY "${ANDROID_SDK_ROOT}")
message(FATAL_ERROR "Could not find ANDROID_SDK_ROOT or path is not a directory: ${ANDROID_SDK_ROOT}")
endif()
-# Get the Android SDK jar for an API version other than the one specified with
-# QT_ANDROID_API_USED_FOR_JAVA.
-function(qt_get_android_sdk_jar_for_api api out_jar_location)
- set(jar_location "${ANDROID_SDK_ROOT}/platforms/${api}/android.jar")
- if (NOT EXISTS "${jar_location}")
- message(WARNING "Could not locate Android SDK jar for api '${api}', defaulting to ${QT_ANDROID_API_USED_FOR_JAVA}")
- set(${out_jar_location} ${QT_ANDROID_JAR} PARENT_SCOPE)
- else()
- set(${out_jar_location} ${jar_location} PARENT_SCOPE)
- endif()
-endfunction()
-
# This variable specifies the API level used for building Java code, it can be the same as Qt for
# Android's maximum supported Android version or higher.
set(QT_ANDROID_API_USED_FOR_JAVA "android-34")
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py
index bc43f3ec28f..39ed8fa634d 100755
--- a/util/cmake/pro2cmake.py
+++ b/util/cmake/pro2cmake.py
@@ -3798,20 +3798,12 @@ def write_jar(cm_fh: IO[str], scope: Scope, *, indent: int = 0) -> str:
raise RuntimeError("Could not locate jar install path")
install_dir = install_dir.replace("$$[QT_INSTALL_PREFIX]/", "")
- android_sdk_jar = "${QT_ANDROID_JAR}"
- android_api_level = scope.get_string("API_VERSION")
- if android_api_level:
- cm_fh.write(
- f'{spaces(indent)}qt_get_android_sdk_jar_for_api("{android_api_level}" android_sdk)\n\n'
- )
- android_sdk_jar = "${android_sdk}"
-
write_source_file_list(
cm_fh, scope, "", ["JAVASOURCES"], indent=indent, header="set(java_sources\n", footer=")\n"
)
cm_fh.write(f"{spaces(indent)}qt_internal_add_jar({target}\n")
- cm_fh.write(f"{spaces(indent+1)}INCLUDE_JARS {android_sdk_jar}\n")
+ cm_fh.write(f"{spaces(indent+1)}INCLUDE_JARS ${{QT_ANDROID_JAR}}\n")
cm_fh.write(f"{spaces(indent+1)}SOURCES ${{java_sources}}\n")
cm_fh.write(f'{spaces(indent+1)}OUTPUT_DIR "${{QT_BUILD_DIR}}/{install_dir}"\n')
cm_fh.write(f"{spaces(indent)})\n\n")