diff --git a/platforms/android/android.toolchain.cmake b/platforms/android/android.toolchain.cmake index 9f9679e0a8..4ac7102258 100644 --- a/platforms/android/android.toolchain.cmake +++ b/platforms/android/android.toolchain.cmake @@ -1587,7 +1587,13 @@ set( ANDROID True ) set( BUILD_ANDROID True ) # where is the target environment -set( CMAKE_FIND_ROOT_PATH "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" ) +set( CMAKE_FIND_ROOT_PATH + "${ANDROID_TOOLCHAIN_ROOT}/bin" + "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" + "${ANDROID_SYSROOT}" + "${ANDROID_NDK}/sysroot" # NDK16+ + "${CMAKE_INSTALL_PREFIX}" + "${CMAKE_INSTALL_PREFIX}/share" ) # only search for libraries and includes in the ndk toolchain set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )