• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1project(lws-minimal-http-server-sse-ring C)
2cmake_minimum_required(VERSION 2.8.12)
3find_package(libwebsockets CONFIG REQUIRED)
4include(CheckIncludeFile)
5include(CheckCSourceCompiles)
6
7set(SAMP lws-minimal-http-server-sse-ring)
8set(SRCS minimal-http-server-sse-ring.c)
9
10set(requirements 1)
11require_pthreads(requirements)
12require_lws_config(LWS_ROLE_H1 1 requirements)
13require_lws_config(LWS_WITH_SERVER 1 requirements)
14
15if (requirements)
16	add_executable(${SAMP} ${SRCS})
17
18	if (websockets_shared)
19		target_link_libraries(${SAMP} websockets_shared ${PTHREAD_LIB} ${LIBWEBSOCKETS_DEP_LIBS})
20		add_dependencies(${SAMP} websockets_shared)
21	else()
22		target_link_libraries(${SAMP} websockets ${PTHREAD_LIB} ${LIBWEBSOCKETS_DEP_LIBS})
23	endif()
24endif()
25