1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
libwebsockets/minimal-examples/embedded/lws-minimal-esp32/CMakeLists.txt
Andy Green cabe021955 esp32: shift to support latest esp-idf
Esp-idf has an improved but still kind of abused cmake-
based build system now.

If we see ESP_PLATFORM coming as a cmake var, we can know we
are being built from inside the esp-idf config system.

Leave the existing esp32 arrangements alone but triggered off
ESP_PLATFORM, adapt to use the cross toolchain file and
various quirks automatically.

In this way you can build lws a part of your project in a
much cleaner way.

Prepare a minimal esp32 test app for use in Sai

Adapt .sai.json to build for esp32
2020-05-27 08:40:12 +01:00

21 lines
547 B
CMake

cmake_minimum_required(VERSION 3.5)
if (ESP_PLATFORM)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(lws-minimal-esp32)
enable_testing()
target_link_libraries(lws-minimal-esp32.elf websockets)
add_subdirectory(libwebsockets)
add_test(NAME flashing COMMAND idf.py flash)
set_tests_properties(flashing PROPERTIES
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
TIMEOUT 120)
add_test(NAME boot COMMAND /usr/local/bin/sai-expect)
set_tests_properties(boot PROPERTIES
DEPENDS flashing
TIMEOUT 20)
endif()