summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2022-09-09 15:11:14 +0200
committerDaniel Stenberg <daniel@haxx.se>2022-09-09 15:11:14 +0200
commit664249d095275ec532f55dd1752d80c8c1093a77 (patch)
treef8e3add4b66fb64271d22178743f3dc2f1758dcd /CMakeLists.txt
parent60a3b25dbf1f211f6ba5216f2d774cfb26cb3e29 (diff)
downloadcurl-664249d095275ec532f55dd1752d80c8c1093a77.tar.gz
ws: initial websockets support
Closes #8995
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ba79d9ec7..564c4dbc5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1176,6 +1176,16 @@ endif()
set(CMAKE_REQUIRED_FLAGS)
+option(ENABLE_WEBSOCKETS "Set to ON to enable EXPERIMENTAL websockets" OFF)
+
+if(ENABLE_WEBSOCKETS)
+ if(${SIZEOF_CURL_OFF_T} GREATER "4")
+ set(USE_WEBSOCKETS ON)
+ else()
+ message(WARNING "curl_off_t is too small to enable WebSockets")
+ endif()
+endif()
+
foreach(CURL_TEST
HAVE_GLIBC_STRERROR_R
HAVE_POSIX_STRERROR_R
@@ -1486,6 +1496,8 @@ _add_if("SFTP" USE_LIBSSH2 OR USE_LIBSSH)
_add_if("RTSP" NOT CURL_DISABLE_RTSP)
_add_if("RTMP" USE_LIBRTMP)
_add_if("MQTT" NOT CURL_DISABLE_MQTT)
+_add_if("WS" USE_WEBSOCKETS)
+_add_if("WSS" USE_WEBSOCKETS)
if(_items)
list(SORT _items)
endif()