The CMakeList.txt looks like this (simplified)
Code: Select all
if(CONFIG_USE_LVGL)
set(priv_requires driver freertos lvgl)
message("LVGL enabled")
else()
set(priv_requires driver freertos)
#The following works???
#set(priv_requires driver freertos lvgl)
message("LVGL disabled")
endif()
message("priv_requires: ${priv_requires}")
idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS include
PRIV_INCLUDE_DIRS source
PRIV_REQUIRES "${priv_requires}")
I am using esp-idf v4.1 and VisualGDB