fix(lwip/cmake): avoid using uninitialized srcs variable

Currently, lwip's CMakeLists.txt might use an uninitialized srcs value
if CONFIG_LWIP_ENABLE is disabled. This means it could use a srcs value
set by another component, involving sources that are entirely
unrelated to the lwip component during registration. Perhaps we
should simply exit when CONFIG_LWIP_ENABLE is not enabled and avoid
registering the component altogether.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
Frantisek Hrbata
2025-03-27 08:11:38 +01:00
committed by BOT
parent fc4b2fbc28
commit f50ae95ab5

View File

@@ -1,4 +1,5 @@
idf_build_get_property(target IDF_TARGET)
set(srcs "")
if(CONFIG_LWIP_ENABLE)
if(NOT ${target} STREQUAL "linux")