0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-26 06:41:03 +08:00

Problem: WS build option is independent of DRAFT

Solution: make the default depend on the value of the DRAFT build flag
This commit is contained in:
Luca Boccassi 2020-01-19 16:36:29 +00:00
parent ddae567f16
commit 1f00a5bf59
3 changed files with 11 additions and 5 deletions

View File

@ -98,11 +98,15 @@ if(APPLE)
option(ZMQ_BUILD_FRAMEWORK "Build as OS X framework" OFF)
endif()
# Disable webSocket transport
option(DISABLE_WS "Disable WebSocket transport" OFF)
# Enable webSocket transport
if (ENABLE_DRAFTS)
option(ENABLE_WS "Enable WebSocket transport" ON)
else()
option(ENABLE_WS "Enable WebSocket transport" OFF)
endif()
option(WITH_NSS "Use NSS instead of builtin sha1" OFF)
if (NOT DISABLE_WS)
if (ENABLE_WS)
list(APPEND sources
${CMAKE_CURRENT_SOURCE_DIR}/src/ws_address.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/wss_address.cpp

2
NEWS
View File

@ -27,7 +27,7 @@
of WebSockets (and secure WebSockets via TLS) via the ZWS 2.0 protocol.
WSS requires the GnuTLS library for TLS support. ZMQ_WSS_ specific socket
options were added to support TLS.
WebSockets support can be disabled at build time with --disable-ws.
WebSockets support is disabled by default if DRAFT APIs are disabled.
* Fixed #3566 - malformed CURVE message can cause memory leak

View File

@ -565,7 +565,9 @@ AM_CONDITIONAL(USE_WEPOLL, test "$poller" = "wepoll")
ws_crypto_library=""
AC_ARG_ENABLE([ws],
[AS_HELP_STRING([--disable-ws], [Disable WebSocket transport [default=no]])])
[AS_HELP_STRING([--enable-ws], [Enable WebSocket transport [default=state of DRAFT]])],
[enable_ws=$enableval],
[enable_ws=$enable_drafts])
AC_ARG_WITH([nss],
[AS_HELP_STRING([--with-nss], [use nss instead of built-in sha1 [default=no]])])