1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
libwebsockets/minimal-examples/ws-server/minimal-ws-server-threads/CMakeLists.txt

18 lines
517 B
Text
Raw Normal View History

2018-03-13 13:13:23 +08:00
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)