Files
spice2x.github.io/src/spice2x/external/wslay/CMakeLists.txt
T
bicarus e7b90271ca api: serve the websocket with wslay instead of headsocket (#887)
`HeadSocket` library we are currently using is full of bugs and no
longer maintained. Swap it out with `wslay`.
2026-08-22 21:47:26 -07:00

34 lines
923 B
CMake

cmake_minimum_required(VERSION 3.12)
project(wslay C)
set(WSLAY_HEADERS
msvc_compat.h
wslay_event.h
wslay_frame.h
wslay_macro.h
wslay_net.h
wslay_queue.h
includes/wslay/wslay.h
includes/wslay/wslayver.h
)
set(WSLAY_SOURCES
wslay_event.c
wslay_frame.c
wslay_net.c
wslay_queue.c
)
add_library(wslay STATIC ${WSLAY_HEADERS} ${WSLAY_SOURCES})
# config.h here is checked in rather than generated, see the note in it
target_compile_definitions(wslay PRIVATE HAVE_CONFIG_H)
target_include_directories(wslay PRIVATE ${PROJECT_SOURCE_DIR})
target_include_directories(wslay PUBLIC ${PROJECT_SOURCE_DIR}/includes)
if(MSVC)
target_compile_options(wslay PRIVATE "/FI${PROJECT_SOURCE_DIR}/msvc_compat.h")
else()
# upstream code, and not ours to keep warning clean
target_compile_options(wslay PRIVATE -w)
endif()