diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c74f0ac6174060c73c696dd6b04e6cd9939df05..4e5c8a8dc4f3ee1cb9cf4db9916160aa28c6c9cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,6 +59,10 @@ if(NOT CMAKE_BUILD_TYPE) endif() if(ANDROID) + if(${CMAKE_SYSTEM_VERSION} VERSION_LESS "21") + message(FATAL_ERROR "Unsupport standalone toolchains with Android API level lower than 21") + endif() + set(WITH_GPU OFF CACHE STRING "Disable GPU when cross-compiling for Android" FORCE) set(WITH_AVX OFF CACHE STRING