From 105f7ea3f3257b679b3da3ffc37b3503b95ce336 Mon Sep 17 00:00:00 2001 From: FalsinSoft Date: Sun, 17 Nov 2024 20:34:10 +0100 Subject: [PATCH] Added compilation params for Android --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) 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")