• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1cmake_minimum_required(VERSION 3.4.1)
2add_library(conscrypt_jni
3            SHARED
4            ../common/src/jni/main/cpp/conscrypt/compatibility_close_monitor.cc
5            ../common/src/jni/main/cpp/conscrypt/jniload.cc
6            ../common/src/jni/main/cpp/conscrypt/jniutil.cc
7            ../common/src/jni/main/cpp/conscrypt/native_crypto.cc
8            ../common/src/jni/main/cpp/conscrypt/netutil.cc
9            ../common/src/jni/main/cpp/conscrypt/trace.cc
10            )
11include_directories(../common/src/jni/main/include/
12                    ../common/src/jni/unbundled/include/
13                    ${BORINGSSL_HOME}/include)
14
15find_library(android-log-lib log)
16target_link_libraries(conscrypt_jni ${android-log-lib} ssl crypto)
17
18add_definitions(-DANDROID
19                -fvisibility=hidden
20                -DBORINGSSL_SHARED_LIBRARY
21                -DBORINGSSL_IMPLEMENTATION
22                -DOPENSSL_SMALL
23                -D_XOPEN_SOURCE=700
24                -Wno-unused-parameter)
25
26if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
27    set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -march=armv8-a+crypto")
28endif()
29
30add_subdirectory(${BORINGSSL_HOME} ${CMAKE_CURRENT_BINARY_DIR}/boringssl)
31