Skip to content

Commit

Permalink
Added compilation params for Android
Browse files Browse the repository at this point in the history
  • Loading branch information
FalsinSoft committed Nov 17, 2024
1 parent 45df8a4 commit 105f7ea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 105f7ea

Please sign in to comment.