Debian Codegraph @

minimal-examples/http-client/minimal-http-client-h2-rxflow/CMakeLists.txt

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 project(lws-minimal-http-client-h2-rxflow C)
2 cmake_minimum_required(VERSION 2.8.12)
3 find_package(libwebsockets CONFIG REQUIRED)
4 list(APPEND CMAKE_MODULE_PATH ${LWS_CMAKE_DIR})
5 include(CheckCSourceCompiles)
6 include(LwsCheckRequirements)
7
8 set(SAMP lws-minimal-http-client-h2-rxflow)
9 set(SRCS minimal-http-client.c)
10
11 set(requirements 1)
12 require_lws_config(LWS_ROLE_H2 1 requirements)
13 require_lws_config(LWS_WITH_CLIENT 1 requirements)
14 require_lws_config(LWS_WITH_SYS_STATE 1 requirements)
15 require_lws_config(LWS_WITH_TLS 1 requirements)
16
17 if (requirements)
18 add_executable(${SAMP} ${SRCS})
19 if (LWS_CTEST_INTERNET_AVAILABLE)
20 add_test(NAME http-client-h2-rxflow-warmcat COMMAND lws-minimal-http-client-h2-rxflow)
21 add_test(NAME http-client-h2-rxflow-warmcat-h1 COMMAND lws-minimal-http-client-h2-rxflow --h1)
22 set_tests_properties(http-client-h2-rxflow-warmcat
23 http-client-h2-rxflow-warmcat-h1
24 PROPERTIES
25 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/minimal-examples/http-client/minimal-http-client-h2-rxflow
26 TIMEOUT 30)
27 endif()
28
29 if (websockets_shared)
30 target_link_libraries(${SAMP} websockets_shared ${LIBWEBSOCKETS_DEP_LIBS})
31 add_dependencies(${SAMP} websockets_shared)
32 else()
33 target_link_libraries(${SAMP} websockets ${LIBWEBSOCKETS_DEP_LIBS})
34 endif()
35 endif()