Skip to content

Commit 138095b

Browse files
committed
Added usrsctp to the project & build instructions
1 parent 59b07c6 commit 138095b

File tree

4 files changed

+51
-3
lines changed

4 files changed

+51
-3
lines changed

‎.gitmodules

+9-2
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,24 @@
5757
[submodule "vkryl/core"]
5858
path = vkryl/core
5959
url = https://github.com/TGX-Android/X-Core.git
60-
shallow = true
60+
shallow = true
6161
[submodule "rlottie"]
6262
path = app/jni/third_party/rlottie
6363
url = https://github.com/TGX-Android/rlottie
6464
shallow = true
6565
[submodule "vkryl/td"]
6666
path = vkryl/td
6767
url = https://github.com/TGX-Android/tdlib-utils.git
68+
shallow = true
6869
[submodule "vkryl/android"]
6970
path = vkryl/android
7071
url = https://github.com/TGX-Android/X-Android.git
71-
[submodule "app/jni/third_party/boringssl"]
72+
shallow = true
73+
[submodule "boringssl"]
7274
path = app/jni/third_party/boringssl
7375
url = https://github.com/google/boringssl
76+
shallow = true
77+
[submodule "usrsctp"]
78+
path = app/jni/third_party/usrsctp
79+
url = https://github.com/sctplab/usrsctp
80+
shallow = true

‎app/jni/BuildVoIP.cmake

+39-1
Original file line numberDiff line numberDiff line change
@@ -364,4 +364,42 @@ target_include_directories(tgvoip PRIVATE
364364
target_compile_options(tgvoip PRIVATE
365365
-frtti -fexceptions -finline-functions -ffast-math -fno-strict-aliasing -Wno-unknown-pragmas
366366
)
367-
target_link_libraries(tgvoip PUBLIC log OpenSLES)
367+
target_link_libraries(tgvoip PUBLIC log OpenSLES)
368+
369+
# usrsctp
370+
371+
set(USRSCTP_DIR "${THIRDPARTY_DIR}/usrsctp/usrsctplib")
372+
373+
add_library(usrsctp STATIC
374+
"${USRSCTP_DIR}/netinet/sctp_asconf.c"
375+
"${USRSCTP_DIR}/netinet/sctp_auth.c"
376+
"${USRSCTP_DIR}/netinet/sctp_bsd_addr.c"
377+
"${USRSCTP_DIR}/netinet/sctp_callout.c"
378+
"${USRSCTP_DIR}/netinet/sctp_cc_functions.c"
379+
"${USRSCTP_DIR}/netinet/sctp_crc32.c"
380+
"${USRSCTP_DIR}/netinet/sctp_indata.c"
381+
"${USRSCTP_DIR}/netinet/sctp_input.c"
382+
"${USRSCTP_DIR}/netinet/sctp_output.c"
383+
"${USRSCTP_DIR}/netinet/sctp_pcb.c"
384+
"${USRSCTP_DIR}/netinet/sctp_peeloff.c"
385+
"${USRSCTP_DIR}/netinet/sctp_sha1.c"
386+
"${USRSCTP_DIR}/netinet/sctp_ss_functions.c"
387+
"${USRSCTP_DIR}/netinet/sctp_sysctl.c"
388+
"${USRSCTP_DIR}/netinet/sctp_timer.c"
389+
"${USRSCTP_DIR}/netinet/sctp_userspace.c"
390+
"${USRSCTP_DIR}/netinet/sctp_usrreq.c"
391+
"${USRSCTP_DIR}/netinet/sctputil.c"
392+
"${USRSCTP_DIR}/netinet6/sctp6_usrreq.c"
393+
"${USRSCTP_DIR}/user_environment.c"
394+
"${USRSCTP_DIR}/user_mbuf.c"
395+
"${USRSCTP_DIR}/user_recv_thread.c"
396+
"${USRSCTP_DIR}/user_socket.c"
397+
)
398+
target_compile_definitions(usrsctp PRIVATE
399+
__Userspace__
400+
SCTP_SIMPLE_ALLOCATOR
401+
SCTP_PROCESS_LEVEL_LOCKS
402+
)
403+
target_include_directories(usrsctp PUBLIC
404+
"${USRSCTP_DIR}"
405+
)

‎app/jni/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ set(EXCLUDE_LIBS
108108
liblz4.a
109109
"${SSL_LIB_PATH}"
110110
"${CRYPTO_LIB_PATH}"
111+
libusrsctp.a
111112
)
112113
if (${USE_WEBP})
113114
list(APPEND EXCLUDE_LIBS
@@ -579,6 +580,7 @@ target_link_libraries(${NATIVE_LIB}
579580
lz4
580581
ssl
581582
crypto
583+
usrsctp
582584
)
583585
if (${USE_WEBP})
584586
target_link_libraries(${NATIVE_LIB} webpdecoder_static)

‎app/jni/third_party/usrsctp

Submodule usrsctp added at 01cc4e0

0 commit comments

Comments
 (0)