diff options
author | Sergiu Deitsch <sergiu.deitsch@gmail.com> | 2022-10-17 16:45:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-10-17 19:51:10 (GMT) |
commit | c833df092406874c84dce94c708fe90272701379 (patch) | |
tree | f91c2af0b40af140874ef12790ea2979c5686280 /Help/guide/tutorial/Step5/MathFunctions | |
parent | 06294a1945110d7d7d0e3c39401c606f8edf95c9 (diff) | |
download | CMake-c833df092406874c84dce94c708fe90272701379.zip CMake-c833df092406874c84dce94c708fe90272701379.tar.gz CMake-c833df092406874c84dce94c708fe90272701379.tar.bz2 |
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
Diffstat (limited to 'Help/guide/tutorial/Step5/MathFunctions')
0 files changed, 0 insertions, 0 deletions