But my settings are always ignored and building always results in else() case with "componentE"
my CmakeLists.txt of my compoonent to configure
Code: Select all
set(priv_requires "componentA" "componentB" )
if(CONFIG_OPTION_1)
list(APPEND priv_requires "componentC")
elseif(CONFIG_OPTION_2)
list(APPEND priv_requires "componentD")
else()
list(APPEND priv_requires "componentE")
endif()
idf_component_register(
SRCS ...
INCLUDE_DIRS ...
PRIV_REQUIRES ${priv_requires}
)
Code: Select all
menu "Component Choose"
choice OPTION_CHOOSE
prompt "Choose device"
default OPTION_1
config OPTION_1
bool "option1"
config OPTION_2
bool "option2"
endchoice
endmenu
So what I am missing here. CONFIG_OPTION_1 and CONFIG_OPTION_2 always are ignored in my CmakeLists.txt