feat(examples): Add support for lwip build under linux

This commit is contained in:
David Cermak
2023-04-04 12:57:38 +02:00
parent c443326a34
commit 588465d9db
12 changed files with 56 additions and 21 deletions

View File

@ -1,8 +1,10 @@
set(requires "")
if(${IDF_TARGET} STREQUAL "linux")
list(APPEND requires esp_stubs esp-tls protocol_examples_common mqtt)
endif()
idf_component_register(SRCS "app_main.c"
INCLUDE_DIRS "."
REQUIRES ${requires})
idf_component_register(SRCS "app_main.cpp"
INCLUDE_DIRS ".")
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")
if(${IDF_TARGET} STREQUAL "linux")
if(WITH_LWIP STREQUAL "1")
target_compile_definitions(${COMPONENT_LIB} PUBLIC WITH_LWIP)
endif()
endif()