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_LWSAC "With lwsac" ON) 15 set(LWS_WITH_LWSAC ON) 16 option(LWS_WITH_STRUCT_JSON "With lws_struct JSON" ON) 17 set(LWS_WITH_STRUCT_JSON ON) 18 option(LWS_WITH_SYS_NTPCLIENT "With ntpclient" ON) 19 set(LWS_WITH_SYS_NTPCLIENT ON) 20 21 add_subdirectory(libwebsockets) 22 23 add_test(NAME flashing COMMAND idf.py flash) 24 set_tests_properties(flashing PROPERTIES 25 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} 26 TIMEOUT 120) 27 28 add_test(NAME boot COMMAND /usr/local/bin/sai-expect) 29 set_tests_properties(boot PROPERTIES 30 DEPENDS flashing 31 TIMEOUT 60) 32 33endif() 34