workaround is to use r19 for now or set -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=BOTH \ in Qt-CMAKE based recipes
I think best solution would be to set CMAKE_FIND_ROOT_PATH to Android_NDK, Qt and OSGEO4A/build folders , but it has to be fixed upstream https://github.com/android-ndk/ndk/issues/919
part of offending ndk/android-toolchain.cmake
# https://github.com/android-ndk/ndk/issues/890
#
# ONLY doesn’t do anything when CMAKE_FIND_ROOT_PATH is not set. Without this,
# CMake will wrongly search host sysroots for headers/libraries. The actual path
# used here is fairly meaningless since CMake doesn’t handle the NDK sysroot
# layout (per-arch and per-verion subdirectories for libraries), so find_library
# is handled separately by CMAKE_SYSTEM_LIBRARY_PATH.
set(CMAKE_FIND_ROOT_PATH “${ANDROID_NDK}“)
# Allow users to override these values in case they want more strict behaviors.
# For example, they may want to prevent the NDK’s libz from being picked up so
# they can use their own.
# https://github.com/android-ndk/ndk/issues/517
if(NOT CMAKE_FIND_ROOT_PATH_MODE_PROGRAM)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
endif()
if(NOT CMAKE_FIND_ROOT_PATH_MODE_LIBRARY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
endif()
if(NOT CMAKE_FIND_ROOT_PATH_MODE_INCLUDE)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
endif()
if(NOT CMAKE_FIND_ROOT_PATH_MODE_PACKAGE)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
endif()
This change made a policy a bit more strict, so now host paths are ignored for finding QT modules: https://github.com/android-ndk/ndk/issues/890
workaround is to use r19 for now or set
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=BOTH \
in Qt-CMAKE based recipesI think best solution would be to set
CMAKE_FIND_ROOT_PATH
to Android_NDK, Qt and OSGEO4A/build folders , but it has to be fixed upstream https://github.com/android-ndk/ndk/issues/919part of offending
ndk/android-toolchain.cmake