Fix Cygwin compilation:
- Fix various incompatibilities and differences between Linux and Cygwin builds - Make usrsctp an optional dependency - Fix building without SSL - Add new secure random bytes function, use it for websockets - Switch to libsrtp2 v2.6.0 (currently latest release) - Add patch that makes latest libsrtp2 build in latest Cygwin - Add patch that makes srt build in latest Cygwin - Correctly allow linking libsrtp2 and srt to local mbedtls version
This commit is contained in:
parent
db30be38c5
commit
dbafa808b8
23 changed files with 131 additions and 23 deletions
|
@ -1,6 +1,11 @@
|
|||
project('SRT', 'cpp', 'c', version: '1.5.1')
|
||||
|
||||
add_project_arguments(['-DENABLE_LOGGING=1', '-O3', '-DNDEBUG', '-DENABLE_MONOTONIC_CLOCK=1', '-DENABLE_NEW_RCVBUFFER=1', '-DENABLE_SOCK_CLOEXEC=1', '-DHAI_ENABLE_SRT=1', '-DHAI_PATCH=1', '-DHAVE_INET_PTON=1', '-DHAVE_PTHREAD_GETNAME_NP=1', '-DHAVE_PTHREAD_SETNAME_NP=1', '-DLINUX=1', '-DNDEBUG', '-DSRT_DYNAMIC', '-DSRT_ENABLE_APP_READER', '-DSRT_ENABLE_BINDTODEVICE', '-DSRT_ENABLE_CLOSE_SYNCH', '-DSRT_ENABLE_ENCRYPTION', '-DSRT_EXPORTS', '-DSRT_VERSION="1.5.1"', '-DUSE_MBEDTLS=1', '-D_GNU_SOURCE'], language: ['cpp','c'])
|
||||
if host_machine.system() == 'cygwin'
|
||||
add_project_arguments(['-DENABLE_LOGGING=1', '-O3', '-DNDEBUG', '-DENABLE_MONOTONIC_CLOCK=1', '-DENABLE_NEW_RCVBUFFER=1', '-DENABLE_SOCK_CLOEXEC=1', '-DHAI_ENABLE_SRT=1', '-DHAI_PATCH=1', '-DHAVE_INET_PTON=1', '-DHAVE_PTHREAD_GETNAME_NP=1', '-DHAVE_PTHREAD_SETNAME_NP=1', '-DCYGWIN=1', '-DCYGWIN_USE_POSIX', '-DNDEBUG', '-DSRT_DYNAMIC', '-DSRT_ENABLE_APP_READER', '-DSRT_ENABLE_CLOSE_SYNCH', '-DSRT_ENABLE_ENCRYPTION', '-DSRT_EXPORTS', '-DSRT_VERSION="1.5.1"', '-DUSE_MBEDTLS=1', '-D_GNU_SOURCE'], language: ['cpp','c'])
|
||||
else
|
||||
add_project_arguments(['-DENABLE_LOGGING=1', '-O3', '-DNDEBUG', '-DENABLE_MONOTONIC_CLOCK=1', '-DENABLE_NEW_RCVBUFFER=1', '-DENABLE_SOCK_CLOEXEC=1', '-DHAI_ENABLE_SRT=1', '-DHAI_PATCH=1', '-DHAVE_INET_PTON=1', '-DHAVE_PTHREAD_GETNAME_NP=1', '-DHAVE_PTHREAD_SETNAME_NP=1', '-DLINUX=1', '-DNDEBUG', '-DSRT_DYNAMIC', '-DSRT_ENABLE_APP_READER', '-DSRT_ENABLE_BINDTODEVICE', '-DSRT_ENABLE_CLOSE_SYNCH', '-DSRT_ENABLE_ENCRYPTION', '-DSRT_EXPORTS', '-DSRT_VERSION="1.5.1"', '-DUSE_MBEDTLS=1', '-D_GNU_SOURCE'], language: ['cpp','c'])
|
||||
endif
|
||||
|
||||
|
||||
mbedcrypto_lib = dependency('mbedcrypto', required: false)
|
||||
mbedx509_lib = dependency('mbedx509', required: false)
|
||||
|
|
15
subprojects/packagefiles/libsrtp_cygwin_patch
Normal file
15
subprojects/packagefiles/libsrtp_cygwin_patch
Normal file
|
@ -0,0 +1,15 @@
|
|||
diff --git a/meson.build b/meson.build
|
||||
index 81a232e..1f15de9 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -43,6 +43,10 @@ foreach h : check_headers
|
||||
endif
|
||||
endforeach
|
||||
|
||||
+if (host_system == 'cygwin')
|
||||
+ cdata.set('HAVE_MACHINE_TYPES_H', false)
|
||||
+endif
|
||||
+
|
||||
check_functions = [
|
||||
'sigaction',
|
||||
'inet_aton',
|
|
@ -106,7 +106,7 @@ libmbedtls = library('mbedtls',
|
|||
)
|
||||
|
||||
mbedtls_dep = declare_dependency(
|
||||
link_with: [libmbedtls],
|
||||
link_with: [libmbedtls, libmbedx509, libmbedcrypto],
|
||||
include_directories: incl,
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue