• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1cmake_minimum_required(VERSION 3.5)
2
3if (ESP_PLATFORM)
4	include($ENV{IDF_PATH}/tools/cmake/project.cmake)
5	project(lws-minimal-esp32)
6	enable_testing()
7
8	target_link_libraries(lws-minimal-esp32.elf websockets)
9
10	option(LWS_WITH_DRIVERS "With generic drivers for gpio, i2c, display etc" ON)
11	set(LWS_WITH_DRIVERS ON)
12	option(LWS_WITH_SECURE_STREAMS "With secure streams" ON)
13	set(LWS_WITH_SECURE_STREAMS ON)
14	option(LWS_WITH_SECURE_STREAMS_STATIC_POLICY_ONLY "static ssp" OFF)
15	set(LWS_WITH_SECURE_STREAMS_STATIC_POLICY_ONLY OFF)
16	option(LWS_WITH_LWSAC "With lwsac" ON)
17	set(LWS_WITH_LWSAC ON)
18	option(LWS_WITH_STRUCT_JSON "With lws_struct JSON" ON)
19	set(LWS_WITH_STRUCT_JSON ON)
20	option(LWS_WITH_SYS_NTPCLIENT "With ntpclient" ON)
21        set(LWS_WITH_SYS_NTPCLIENT ON)
22
23
24	add_subdirectory(libwebsockets)
25
26	add_test(NAME flashing COMMAND idf.py flash)
27	set_tests_properties(flashing PROPERTIES
28			     WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
29			     TIMEOUT 120)
30
31	add_test(NAME boot COMMAND /usr/local/bin/sai-expect)
32	set_tests_properties(boot PROPERTIES
33			     DEPENDS flashing
34			     TIMEOUT 20)
35
36endif()
37