mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00

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
6 lines
309 B
CMake
6 lines
309 B
CMake
idf_component_register(SRCS
|
|
"lws-minimal-esp32.c"
|
|
INCLUDE_DIRS "../libwebsockets/include;${IDF_PATH}/components/spi_flash/include;${IDF_PATH}/components/nvs_flash/include;${IDF_PATH}/components/mdns/include")
|
|
|
|
target_link_libraries(${COMPONENT_LIB} websockets)
|
|
include_directories(../build/libwebsockets)
|