32df595275
Task-number: QTBUG-105718 Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
22 lines
671 B
CMake
22 lines
671 B
CMake
# Copyright (C) 2022 The Qt Company Ltd.
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
# This function can be used to compile java sources into a jar package.
|
|
|
|
function(qt_internal_add_jar target)
|
|
|
|
set(javac_target_version "${QT_ANDROID_JAVAC_TARGET}")
|
|
if (NOT javac_target_version)
|
|
set(javac_target_version "8")
|
|
endif()
|
|
|
|
set(javac_source_version "${QT_ANDROID_JAVAC_SOURCE}")
|
|
if (NOT javac_source_version)
|
|
set(javac_source_version "8")
|
|
endif()
|
|
|
|
set(CMAKE_JAVA_COMPILE_FLAGS -source "${javac_source_version}" -target "${javac_target_version}" -Xlint:unchecked -bootclasspath "${QT_ANDROID_JAR}")
|
|
add_jar(${ARGV})
|
|
|
|
endfunction()
|