BoringSSL 下载
https://github.com/google/boringssl
GO
编译的时候需要用GO以及依赖模块。由于’你懂得’的原因无法访问!建议使用goproxy.cn ,七牛云赞助!
编译
Android编译脚本:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/usr/bin/env bash
rm -r build
mkdir build
cd build
# ABI("2", "armeabi-v7a", "arm-linux-androideabi-clang3.5", cmake_vars=dict(ANDROID_ABI='armeabi-v7a with NEON')),
# ABI("1", "armeabi", "arm-linux-androideabi-clang3.5", cmake_vars=dict(WITH_TBB='OFF')),
# ABI("3", "arm64-v8a", "aarch64-linux-android-clang3.5")
CMAKE_VERSION=3.18.1
${ANDROID_HOME}/cmake/${CMAKE_VERSION}/bin/cmake \
-DANDROID_ABI=arm64-v8a \
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \
-DANDROID_NATIVE_API_LEVEL=21 \
-DCMAKE_BUILD_TYPE=Release \
-GNinja \
..
#ninja -j 8
cmake --build .
exit 0
|
iOS编译脚本:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/usr/bin/env bash
rm -r build
mkdir build
cd build
#arch:x86_64、arm64、armv7
#GO_EXECUTABLE=/usr/local/bin/go
CMAKE_VERSION=3.18.1
${ANDROID_HOME}/cmake/${CMAKE_VERSION}/bin/cmake \
-DCMAKE_OSX_SYSROOT=iphoneos \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_BUILD_TYPE=Release \
-GNinja \
..
ninja
exit 0
|