I have a custom Kconfig.projbuild and setting options via menuconfig. In my SDKConfig I see
Code: Select all
CONFIG_MICROGPU_DATABUS_SPI=y
Code: Select all
set(SOURCES
displays/i80_display.c
main.c
${MICROGPU_COMMON_SOURCES}
../../microgpu-common/color_rgb565.c
)
if (CONFIG_MICROGPU_DATABUS_SPI)
list(APPEND SOURCES "spi_databus.c")
elseif (CONFIG_MICROGPU_DATABUS_BENCHMARK)
list(APPEND SOURCES "benchmark_databus.c")
else ()
message(FATAL_ERROR "No databus type set")
endif ()
idf_component_register(SRCS ${SOURCES}
INCLUDE_DIRS "." "../../")
However, putting this block after the component register "works". It appears that we do not have access to the kconfig variables until *after* the `idf_component_register()` call. This seems to be in direct contradiction to the build system documentation.
Am I doing something wrong? Is there a way to add sources after a `idf_component_register()` call?