# The generated code of the settings API (generate.sh writes gen/), on ESP-IDF's protobuf-c runtime.
file(GLOB_RECURSE srcs "${CMAKE_CURRENT_LIST_DIR}/gen/*.pb-c.c")
if(NOT srcs)
    message(FATAL_ERROR "No generated code in ${CMAKE_CURRENT_LIST_DIR}/gen: run ./generate.sh first")
endif()

idf_component_register(SRCS ${srcs}
                       INCLUDE_DIRS "gen"
                       REQUIRES protobuf-c)
