From 6b348a54bd02338382cee99e6956bfcca577f57c Mon Sep 17 00:00:00 2001 From: Jackson Ming Hu Date: Mon, 1 Jul 2019 14:48:43 +0100 Subject: [PATCH] CMakeList: detect ESP_PLATFORM for ESP32 --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ae7ad447..26662dd82 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,6 +129,13 @@ option(LWS_WITH_ASAN "Build with gcc runtime sanitizer options enabled (needs li # End of user settings # +# Workaround for ESP-IDF +# Detect ESP_PLATFORM environment flag, if exist, set LWS_WITH_ESP32. +# Otherwise the user may not be able to run configuration ESP-IDF in the first time. +if(ESP_PLATFORM) + set(LWS_WITH_ESP32 ON) +endif() + if (LWS_FOR_GITOHASHI) set(LWS_WITH_THREADPOOL 1) set(LWS_WITH_HTTP2 1)