cmake: add confirm_command macro and use for genromfs + xxd on ESP32 build
Solves the exact issue in https://github.com/warmcat/libwebsockets/issues/1021
This commit is contained in:
parent
ca3013ca38
commit
dee2d68b9c
1 changed files with 12 additions and 0 deletions
|
@ -121,6 +121,14 @@ option(LWS_AVOID_SIGPIPE_IGN "Android 7+ seems to need this" OFF)
|
|||
option(LWS_WITH_STATS "Keep statistics of lws internal operations" OFF)
|
||||
option(LWS_WITH_SOCKS5 "Allow use of SOCKS5 proxy on client connections" OFF)
|
||||
|
||||
macro(confirm_command CMD NOCMD)
|
||||
find_program (HAVE_CMD_${CMD} ${CMD} )
|
||||
if (NOT HAVE_CMD_${CMD})
|
||||
message(FATAL_ERROR "Missing command ${CMD} required for build: ${NOCMD}" )
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
if (LWS_WITH_LWSWS)
|
||||
message(STATUS "LWS_WITH_LWSWS --> Enabling LWS_WITH_PLUGINS and LWS_WITH_LIBUV")
|
||||
set(LWS_WITH_PLUGINS 1)
|
||||
|
@ -169,6 +177,10 @@ if (LWS_WITH_ESP8266)
|
|||
endif()
|
||||
|
||||
if (LWS_WITH_ESP32)
|
||||
|
||||
confirm_command(xxd "usually found in vim package")
|
||||
confirm_command(genromfs "install genromfs package")
|
||||
|
||||
set(LWS_WITH_SHARED OFF)
|
||||
set(LWS_USE_MBEDTLS ON)
|
||||
# set(LWS_WITHOUT_CLIENT ON)
|
||||
|
|
Loading…
Add table
Reference in a new issue