mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-23 00:00:06 +01:00
16 lines
420 B
CMake
16 lines
420 B
CMake
cmake_minimum_required(VERSION 2.8.9)
|
|
include(CheckFunctionExists)
|
|
|
|
set(SAMP lws-minimal-ws-server-pmd)
|
|
set(SRCS minimal-ws-server-pmd.c)
|
|
|
|
set(CMAKE_REQUIRED_LIBRARIES websockets)
|
|
|
|
CHECK_FUNCTION_EXISTS(lws_extension_callback_pm_deflate HAVE_PMD)
|
|
if (HAVE_PMD)
|
|
else()
|
|
message(FATAL_ERROR "LWS need to have been built for extensions")
|
|
endif()
|
|
|
|
add_executable(${SAMP} ${SRCS})
|
|
target_link_libraries(${SAMP} -lwebsockets)
|