add_custom_target(menuconfig
${menuconfig_depends}
# create any missing config file, with defaults if necessary
- COMMAND ${confgen_basecommand} --output config ${SDKCONFIG}
+ COMMAND ${confgen_basecommand} --env "IDF_TARGET=${IDF_TARGET}" --output config ${SDKCONFIG}
COMMAND ${CMAKE_COMMAND} -E env
"COMPONENT_KCONFIGS=${kconfigs}"
"COMPONENT_KCONFIGS_PROJBUILD=${kconfigs_projbuild}"
"IDF_CMAKE=y"
"KCONFIG_CONFIG=${SDKCONFIG}"
+ "IDF_TARGET=${IDF_TARGET}"
${CMAKE_BINARY_DIR}/${MCONF} ${ROOT_KCONFIG}
VERBATIM
USES_TERMINAL)