android: add CI jobs, buildinfo, cmake docs, disable CURL_USE_PKGCONFIG by default

- GHA/non-native: add Android builds, both cmake and autotools,
  both NDK 21 (oldest available) and 35 (newest available)
  https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md
  It comes with a maintenance burden to bump the oldest/latest values
  with CI runner updates.

- cmake: disable `CURL_USE_PKGCONFIG` by default for Android.
  To avoid picking up system package by default.

- build: add `ANDROID-<NDK-LEVEL>` flag to `buildinfo.txt`.
  Also detect NDK level with the CMake built-in build method:
  https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-android

- INSTALL.md: add CMake build instructions for Android.

- INSTALL.md: make NDK levels consistent in `./configure` example.

Closes #16014
This commit is contained in:
Viktor Szakats 2025-01-15 15:46:32 +01:00
parent 911f003db8
commit 56a74fac47
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
6 changed files with 118 additions and 13 deletions

View file

@ -23,7 +23,8 @@
###########################################################################
@PACKAGE_INIT@
if(UNIX OR VCPKG_TOOLCHAIN OR (MINGW AND NOT CMAKE_CROSSCOMPILING)) # Keep in sync with root CMakeLists.txt
# Keep condition in sync with CMake/curl-config.cmake.in
if((UNIX AND NOT ANDROID) OR VCPKG_TOOLCHAIN OR (MINGW AND NOT CMAKE_CROSSCOMPILING))
set(_curl_use_pkgconfig_default ON)
else()
set(_curl_use_pkgconfig_default OFF)