1d4afb5ceSopenharmony_ciproject(lws-minimal-secure-streams-server-raw C)
2d4afb5ceSopenharmony_cicmake_minimum_required(VERSION 2.8.12)
3d4afb5ceSopenharmony_cifind_package(libwebsockets CONFIG REQUIRED)
4d4afb5ceSopenharmony_cilist(APPEND CMAKE_MODULE_PATH ${LWS_CMAKE_DIR})
5d4afb5ceSopenharmony_ciinclude(CheckCSourceCompiles)
6d4afb5ceSopenharmony_ciinclude(LwsCheckRequirements)
7d4afb5ceSopenharmony_ci
8d4afb5ceSopenharmony_ciset(SAMP lws-minimal-secure-streams-server-raw)
9d4afb5ceSopenharmony_ciset(SRCS main.c ss-server.c)
10d4afb5ceSopenharmony_ci
11d4afb5ceSopenharmony_ciset(requirements 1)
12d4afb5ceSopenharmony_cirequire_lws_config(LWS_ROLE_H1 1 requirements)
13d4afb5ceSopenharmony_cirequire_lws_config(LWS_WITH_SERVER 1 requirements)
14d4afb5ceSopenharmony_cirequire_lws_config(LWS_WITH_SYS_SMD 1 requirements)
15d4afb5ceSopenharmony_cirequire_lws_config(LWS_WITH_SECURE_STREAMS 1 requirements)
16d4afb5ceSopenharmony_cirequire_lws_config(LWS_WITH_SECURE_STREAMS_STATIC_POLICY_ONLY 0 requirements)
17d4afb5ceSopenharmony_ci
18d4afb5ceSopenharmony_ciif (requirements)
19d4afb5ceSopenharmony_ci	add_executable(${SAMP} ${SRCS})
20d4afb5ceSopenharmony_ci
21d4afb5ceSopenharmony_ci	if (websockets_shared)
22d4afb5ceSopenharmony_ci		target_link_libraries(${SAMP} websockets_shared ${LIBWEBSOCKETS_DEP_LIBS})
23d4afb5ceSopenharmony_ci		add_dependencies(${SAMP} websockets_shared)
24d4afb5ceSopenharmony_ci	else()
25d4afb5ceSopenharmony_ci		target_link_libraries(${SAMP} websockets ${LIBWEBSOCKETS_DEP_LIBS})
26d4afb5ceSopenharmony_ci	endif()
27d4afb5ceSopenharmony_ciendif()
28