File tree 7 files changed +72
-1
lines changed
7 files changed +72
-1
lines changed Original file line number Diff line number Diff line change 68
68
[submodule "vkryl/android "]
69
69
path = vkryl/android
70
70
url = https://github.com/TGX-Android/X-Android.git
71
+ [submodule "app/jni/third_party/boringssl "]
72
+ path = app/jni/third_party/boringssl
73
+ url = https://github.com/google/boringssl
Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ set(TDLIB_DIR "${CMAKE_HOME_DIRECTORY}/../../tdlib")
13
13
set (EXO_FLAC_DIR "${CMAKE_HOME_DIRECTORY} /../../thirdparty/ExoPlayer/extensions/flac/src/main/jni" )
14
14
set (UTILS_DIR "${THIRDPARTY_DIR} /jni-utils" )
15
15
16
+ set (SSL_DIR "${THIRDPARTY_DIR} /boringssl" )
17
+ set (SSL_LIB_PATH "${SSL_DIR} /build/${ANDROID_ABI} /ssl/libssl.a" )
18
+ set (CRYPTO_LIB_PATH "${SSL_DIR} /build/${ANDROID_ABI} /crypto/libcrypto.a" )
19
+
16
20
set (YUV_DIR "${THIRDPARTY_DIR} /libyuv" )
17
21
set (LZ4_DIR "${THIRDPARTY_DIR} /lz4/lib" )
18
22
set (RLOTTIE_DIR "${THIRDPARTY_DIR} /rlottie" )
@@ -103,6 +107,8 @@ set(EXCLUDE_LIBS
103
107
libopusfile.a
104
108
librlottie.a
105
109
liblz4.a
110
+ "${SSL_LIB_PATH} "
111
+ "${CRYPTO_LIB_PATH} "
106
112
)
107
113
if (${USE_WEBP} )
108
114
list (APPEND EXCLUDE_LIBS
@@ -137,6 +143,17 @@ if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.11.0")
137
143
)
138
144
endif ()
139
145
146
+ # crypto
147
+
148
+ add_library (crypto STATIC IMPORTED )
149
+ set_target_properties (crypto PROPERTIES IMPORTED_LOCATION "${CRYPTO_LIB_PATH} " )
150
+
151
+ # ssl
152
+
153
+ add_library (ssl STATIC IMPORTED )
154
+ set_target_properties (ssl PROPERTIES IMPORTED_LOCATION "${SSL_LIB_PATH} " )
155
+ target_include_directories (ssl INTERFACE "${SSL_DIR} /include" )
156
+
140
157
# flac
141
158
142
159
ReadVariables("${EXO_FLAC_DIR} /flac_sources.mk" )
@@ -925,6 +942,8 @@ target_link_libraries(${NATIVE_LIB}
925
942
opus
926
943
rlottie
927
944
lz4
945
+ ssl
946
+ crypto
928
947
)
929
948
if (${USE_WEBP} )
930
949
target_link_libraries (${NATIVE_LIB} webpdecoder_static)
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -e
3
+ # shellcheck source=set-env.sh
4
+ source " $( dirname " $0 " ) " /set-env.sh
5
+
6
+ run-cmake-impl.sh " $THIRDPARTY_LIBRARIES /boringssl" || (echo " boringssl build failed" && exit 1)
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -e
3
+
4
+ NDK_CMAKE_DIR=" $ANDROID_SDK_ROOT /cmake/3.18.1"
5
+ NDK_CMAKE_BIN=" $NDK_CMAKE_DIR /bin/cmake"
6
+ NDK_NINJA_BIN=" $NDK_CMAKE_DIR /bin/ninja"
7
+ TARGET_DIR=" $1 "
8
+
9
+ validate_file " $NDK_CMAKE_BIN "
10
+ validate_file " $NDK_NINJA_BIN "
11
+ validate_dir " $TARGET_DIR "
12
+
13
+ function run_cmake {
14
+ ARG_ABI=" $1 "
15
+ ARG_API_LEVEL=" $2 "
16
+ test -d " $ARG_ABI " || mkdir " $ARG_ABI "
17
+ pushd " $ARG_ABI " > /dev/null
18
+
19
+ $NDK_CMAKE_BIN -DANDROID_ABI=" ${ARG_ABI} " \
20
+ -DCMAKE_TOOLCHAIN_FILE=" ${ANDROID_NDK} /build/cmake/android.toolchain.cmake" \
21
+ -DANDROID_NATIVE_API_LEVEL=" ${ARG_API_LEVEL} " \
22
+ -GNinja ../..
23
+ $NDK_NINJA_BIN
24
+
25
+ popd > /dev/null
26
+ }
27
+
28
+ pushd " $TARGET_DIR "
29
+
30
+ test -d build || mkdir build
31
+ pushd build > /dev/null
32
+
33
+ run_cmake arm64-v8a 21
34
+ run_cmake armeabi-v7a 16
35
+ run_cmake x86_64 21
36
+ run_cmake x86 16
37
+
38
+ popd > /dev/null
39
+ popd
Original file line number Diff line number Diff line change @@ -23,6 +23,9 @@ patch-opus-impl.sh
23
23
# Patch ExoPlayer sources
24
24
patch-exoplayer-impl.sh
25
25
26
+ # Build boringssl
27
+ run-cmake-impl.sh " $THIRDPARTY_LIBRARIES /boringssl"
28
+
26
29
# Build and configure libvpx
27
30
build-vpx-impl.sh
28
31
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ version.major=0
4
4
# Anchor date point in app versioning
5
5
version.creation =873642600564
6
6
# Native bundle (/app/jni)
7
- version.jni =220
7
+ version.jni =221
8
8
# TDLib (/tdlib)
9
9
version.tdlib =89
10
10
# LevelDB (/vkryl/leveldb)
You can’t perform that action at this time.
0 commit comments