set(REQUIRES "") if(${ESP_PLATFORM}) list(APPEND REQUIRES nvs_flash) endif() idf_component_register( SRCS src/configulator.c INCLUDE_DIRS "include" # if platform esp... REQUIRES ${REQUIRES} )