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

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:
Andy Green 2017-09-13 08:59:00 +08:00
parent ca3013ca38
commit dee2d68b9c

View file

@ -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)