1cmake_minimum_required(VERSION 3.5) 2 3if (ESP_PLATFORM) 4 include($ENV{IDF_PATH}/tools/cmake/project.cmake) 5 project(lws-minimal-esp32 C) 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 add_subdirectory(libwebsockets) 24 25 add_test(NAME flashing COMMAND idf.py flash) 26 set_tests_properties(flashing PROPERTIES 27 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} 28 TIMEOUT 120) 29 30 add_test(NAME boot COMMAND /usr/local/bin/sai-expect) 31 set_tests_properties(boot PROPERTIES 32 DEPENDS flashing 33 TIMEOUT 60) 34 35endif() 36