summaryrefslogtreecommitdiff
path: root/modules/websocket/SCsub
diff options
context:
space:
mode:
Diffstat (limited to 'modules/websocket/SCsub')
-rw-r--r--modules/websocket/SCsub25
1 files changed, 19 insertions, 6 deletions
diff --git a/modules/websocket/SCsub b/modules/websocket/SCsub
index 067a99ffff..b36f1beacd 100644
--- a/modules/websocket/SCsub
+++ b/modules/websocket/SCsub
@@ -9,7 +9,6 @@ env_lws = env_modules.Clone()
thirdparty_dir = "#thirdparty/lws/"
helper_dir = "win32helpers/"
-openssl_dir = "#thirdparty/openssl/"
thirdparty_sources = [
"client/client.c",
"client/client-handshake.c",
@@ -36,18 +35,25 @@ thirdparty_sources = [
"handshake.c",
"header.c",
"libwebsockets.c",
- "minilex.c",
"output.c",
"pollfd.c",
"service.c",
"ssl.c",
+ "mbedtls_wrapper/library/ssl_cert.c",
+ "mbedtls_wrapper/library/ssl_pkey.c",
+ "mbedtls_wrapper/library/ssl_stack.c",
+ "mbedtls_wrapper/library/ssl_methods.c",
+ "mbedtls_wrapper/library/ssl_lib.c",
+ "mbedtls_wrapper/library/ssl_x509.c",
+ "mbedtls_wrapper/platform/ssl_port.c",
+ "mbedtls_wrapper/platform/ssl_pm.c",
]
if env_lws["platform"] == "android": # Builtin getifaddrs
thirdparty_sources += ["misc/getifaddrs.c"]
-if env_lws["platform"] == "windows": # Winsock
+if env_lws["platform"] == "windows" or env_lws["platform"] == "uwp": # Winsock
thirdparty_sources += ["plat/lws-plat-win.c", helper_dir + "getopt.c", helper_dir + "getopt_long.c", helper_dir + "gettimeofday.c"]
else: # Unix socket
thirdparty_sources += ["plat/lws-plat-unix.c"]
@@ -61,10 +67,17 @@ else:
env_lws.add_source_files(env.modules_sources, thirdparty_sources)
env_lws.Append(CPPPATH=[thirdparty_dir])
- if env['builtin_openssl']:
- env_lws.Append(CPPPATH=[openssl_dir])
+ wrapper_includes = ["#thirdparty/lws/mbedtls_wrapper/include/" + inc for inc in ["internal", "openssl", "platform", ""]]
+ env_lws.Prepend(CPPPATH=wrapper_includes)
- if env_lws["platform"] == "windows":
+ if env['builtin_mbedtls']:
+ mbedtls_includes = "#thirdparty/mbedtls/include"
+ env_lws.Prepend(CPPPATH=[mbedtls_includes])
+
+ if env_lws["platform"] == "windows" or env_lws["platform"] == "uwp":
env_lws.Append(CPPPATH=[thirdparty_dir + helper_dir])
+ if env_lws["platform"] == "uwp":
+ env_lws.Append(CCFLAGS=["/DLWS_MINGW_SUPPORT"])
+
env_lws.add_source_files(env.modules_sources, "*.cpp")