Home | History | Annotate | Download | only in android
      1 cmake_minimum_required(VERSION 3.4.1)
      2 add_library(conscrypt_jni
      3             SHARED
      4             ../common/src/jni/main/cpp/CompatibilityCloseMonitor.cpp
      5             ../common/src/jni/main/cpp/JniConstants.cpp
      6             ../common/src/jni/main/cpp/NativeCrypto.cpp
      7             ../common/src/jni/main/cpp/jni_load.cpp
      8             )
      9 include_directories(../common/src/jni/main/include/
     10                     ../common/src/jni/unbundled/include/
     11                     ${BORINGSSL_HOME}/include)
     12 
     13 find_library(android-log-lib log)
     14 target_link_libraries(conscrypt_jni ${android-log-lib} ssl crypto)
     15 
     16 add_definitions(-DANDROID
     17                 -fvisibility=hidden
     18                 -DBORINGSSL_SHARED_LIBRARY
     19                 -DBORINGSSL_IMPLEMENTATION
     20                 -DOPENSSL_SMALL
     21                 -D_XOPEN_SOURCE=700
     22                 -Wno-unused-parameter)
     23 
     24 if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
     25     set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -march=armv8-a+crypto")
     26 endif()
     27 
     28 add_subdirectory(${BORINGSSL_HOME} ${CMAKE_CURRENT_BINARY_DIR}/boringssl)
     29