MacOS P2P
This commit is contained in:
36
kfile.js
36
kfile.js
@ -140,16 +140,27 @@ if (flags.with_rtc && (platform === Platform.Windows || platform === Platform.Li
|
||||
project.addLib('bcrypt');
|
||||
}
|
||||
else {
|
||||
project.addLib(root + '/libdatachannel/lib/libdatachannel-static.a');
|
||||
project.addLib(root + '/libdatachannel/lib/libjuice-static.a');
|
||||
project.addLib(root + '/libdatachannel/lib/libusrsctp.a');
|
||||
project.addLib(root + '/libdatachannel/lib/libMbedTLS.a');
|
||||
project.addLinkerFlag(root + '/libdatachannel/lib/libdatachannel-static.a');
|
||||
project.addLinkerFlag(root + '/libdatachannel/lib/libjuice-static.a');
|
||||
project.addLinkerFlag(root + '/libdatachannel/lib/libusrsctp.a');
|
||||
project.addLinkerFlag(root + '/libdatachannel/lib/libsrtp2.a');
|
||||
project.addLinkerFlag(root + '/libdatachannel/lib/libMbedTLS.a');
|
||||
if (platform === Platform.OSX) {
|
||||
const odir = '/opt/homebrew/opt/openssl@3/lib';
|
||||
project.addLinkerFlag(path.join(odir, 'libssl.a'));
|
||||
project.addLinkerFlag(path.join(odir, 'libcrypto.a'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (flags.with_networking && platform !== Platform.Windows) {
|
||||
project.addLib('ssl');
|
||||
project.addLib('crypto');
|
||||
// On macOS with RTC, libdatachannel's static OpenSSL must be the only
|
||||
// TLS impl; adding -lssl/-lcrypto would bind some EVP symbols to the
|
||||
// system LibreSSL dylibs and crash inside srtp_init.
|
||||
if (!(flags.with_rtc && platform === Platform.OSX)) {
|
||||
project.addLib('ssl');
|
||||
project.addLib('crypto');
|
||||
}
|
||||
}
|
||||
|
||||
if (flags.with_worker) {
|
||||
@ -200,10 +211,15 @@ else if (platform === Platform.OSX) {
|
||||
project.addLinkerFlag('-framework AppKit');
|
||||
}
|
||||
if (flags.with_networking) {
|
||||
project.addIncludeDir('apple-libressl-sdk/include');
|
||||
project.addLinkerFlag('-L' + root + '/apple-libressl-sdk/lib');
|
||||
project.addLinkerFlag('-lssl');
|
||||
project.addLinkerFlag('-lcrypto');
|
||||
if (flags.with_rtc) {
|
||||
project.addIncludeDir('/opt/homebrew/opt/openssl@3/include');
|
||||
}
|
||||
else {
|
||||
project.addIncludeDir('apple-libressl-sdk/include');
|
||||
project.addLinkerFlag('-L' + root + '/apple-libressl-sdk/lib');
|
||||
project.addLinkerFlag('-lssl');
|
||||
project.addLinkerFlag('-lcrypto');
|
||||
}
|
||||
project.addLinkerFlag('-framework Security');
|
||||
project.addLinkerFlag('-framework SystemConfiguration');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user