Files
CMake/Modules
Sergiu Deitsch c833df0924 FindJNI: replace CMAKE_ANDROID_API by CMAKE_SYSTEM_VERSION
In commit 00c4f488f2 (FindJNI: support Android NDK, 2022-03-18,
v3.24.0-rc1~325^2) we used `CMAKE_ANDROID_API` to check the Android API
level.  However, `CMAKE_SYSTEM_VERSION` is the authoritative value.

When cross-compiling for Android, an unset `CMAKE_ANDROID_API` can
result in failure to locate JNI because the `NativeHelper` component
cannot be found. In this case, the component is falsely assumed to be
available by default (and thus required) since the comparison against an
unset `CMAKE_ANDROID_API` variable evaluates to true.  Use
`CMAKE_SYSTEM_VERSION` to determine the Android API level instead.

Issue: #23830
2022-10-17 15:51:10 -04:00
..
2022-04-11 14:08:01 -04:00
2022-03-30 16:01:59 -04:00
2021-06-24 11:04:01 -04:00

See the "Find Modules" section of the cmake-developer(7) manual page.

For more information about how to contribute modules to CMake, see this page:
https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/dev/Module-Maintainers