diff --git a/CMakeLists.txt b/CMakeLists.txt index cc50e11..466ad8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -261,6 +261,14 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux" list(APPEND SQLITE3MC_LINK_LIBRARIES "-framework Security") endif() set(SHARED_LIB_EXPORT_DEFINITION "__attribute__((visibility(\"default\")))") +elseif (CMAKE_SYSTEM_NAME STREQUAL "Android") + if (ANDROID_ABI STREQUAL "arm64-v8a") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=armv8-a+crypto") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv8-a+crypto") + elseif (ANDROID_ABI STREQUAL "x86_64") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mvaes") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mvaes") + endif() else() if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse4.2 -maes")