Commit 627db103 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Continue to target native API 17 if NDK < 19, otherwise use 21 (unless AAudio...

Continue to target native API 17 if NDK < 19, otherwise use 21 (unless AAudio is enabled in this case target 28)
parent 912ff9b8
......@@ -35,9 +35,14 @@ set(CMAKE_ANDROID_NDK_VERSION ${CMAKE_MATCH_1})
set(CMAKE_ANDROID_NDK_VERSION_MINOR ${CMAKE_MATCH_2})
if(ENABLE_AAUDIO)
set(ANDROID_NATIVE_API_LEVEL "android-28")
set(ANDROID_NATIVE_API_LEVEL "android-28")
else()
set(ANDROID_NATIVE_API_LEVEL "android-21")
if(CMAKE_ANDROID_NDK_VERSION VERSION_LESS 19)
set(ANDROID_NATIVE_API_LEVEL "android-17")
else()
# Starting with NDK 19, API 17 no longer exists
set(ANDROID_NATIVE_API_LEVEL "android-21")
endif()
endif()
set(ANDROID_CPP_FEATURES "rtti exceptions")
set(ANDROID_STL "c++_shared")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment