• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1project(lws-minimal-secure-streams-staticpolicy C)
2cmake_minimum_required(VERSION 2.8.12)
3find_package(libwebsockets CONFIG REQUIRED)
4list(APPEND CMAKE_MODULE_PATH ${LWS_CMAKE_DIR})
5include(CheckCSourceCompiles)
6include(LwsCheckRequirements)
7
8set(SAMP lws-minimal-secure-streams-staticpolicy)
9
10set(requirements 1)
11require_lws_config(LWS_ROLE_H1 1 requirements)
12require_lws_config(LWS_WITHOUT_CLIENT 0 requirements)
13require_lws_config(LWS_WITH_SECURE_STREAMS 1 requirements)
14require_lws_config(LWS_WITH_SECURE_STREAMS_STATIC_POLICY_ONLY 1 requirements)
15
16if (requirements)
17	add_executable(${SAMP} minimal-secure-streams.c)
18
19	if (websockets_shared)
20		target_link_libraries(${SAMP} websockets_shared ${LIBWEBSOCKETS_DEP_LIBS})
21		add_dependencies(${SAMP} websockets_shared)
22	else()
23		target_link_libraries(${SAMP} websockets ${LIBWEBSOCKETS_DEP_LIBS})
24	endif()
25
26endif()
27