tools: raise the minimum CMake version to 3.20 to properly build Android targets
This should provide proper Android support. This version was released 2 years ago.
We should be using the Android CMake toolchain file. We're supposed to use it with the Android SYSTEM_NAME
- https://developer.android.com/studio/projects/configure-cmake
- https://developer.android.com/ndk/guides/cmake
Some patches extracted from !3728 (merged).
The update to a new CMake requirement and using 3.26 is fine with Android, as seen in !3752 (closed).
The bad news is that all Docker images currently use an older CMake (Debian bullseye is using 3.18). So if this works, we should update the Docker images first to build a newer CMake version (using bullseye-backports). Otherwise we'll end up building CMake for every CI run, which will makes considerably slower. While doing that, we should do the same with Meson which is always rebuilt as well...
So there's something going wrong with the "recommended" toolchain file usage, maybe the overriding of some values in our toolchain file.