mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
18 lines
517 B
Text
18 lines
517 B
Text
![]() |
cmake_minimum_required(VERSION 2.8)
|
||
|
include(CheckIncludeFile)
|
||
|
|
||
|
set(SAMP lws-minimal-ws-server-threads)
|
||
|
set(SRCS minimal-ws-server.c)
|
||
|
|
||
|
if (UNIX)
|
||
|
set(CMAKE_C_FLAGS "-Wall -Wsign-compare -Wignored-qualifiers -Wtype-limits -Wuninitialized -Werror -Wundef ${CMAKE_C_FLAGS}" )
|
||
|
endif()
|
||
|
|
||
|
CHECK_INCLUDE_FILE(pthread.h LWS_HAVE_PTHREAD_H)
|
||
|
if (NOT LWS_HAVE_PTHREAD_H)
|
||
|
message(FATAL_ERROR "threading support requires pthreads")
|
||
|
endif()
|
||
|
|
||
|
add_executable(${SAMP} ${SRCS})
|
||
|
target_link_libraries(${SAMP} -lwebsockets -pthread)
|