mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
nvs_flash: build nvs_encr.cpp only if relevant config option is enabled
This commit is contained in:
parent
ecf09382da
commit
f53f450380
@ -1,10 +1,14 @@
|
||||
idf_component_register(SRCS "src/nvs_api.cpp"
|
||||
"src/nvs_encr.cpp"
|
||||
"src/nvs_item_hash_list.cpp"
|
||||
"src/nvs_ops.cpp"
|
||||
"src/nvs_page.cpp"
|
||||
"src/nvs_pagemanager.cpp"
|
||||
"src/nvs_storage.cpp"
|
||||
"src/nvs_types.cpp"
|
||||
set(srcs "src/nvs_api.cpp"
|
||||
"src/nvs_item_hash_list.cpp"
|
||||
"src/nvs_ops.cpp"
|
||||
"src/nvs_page.cpp"
|
||||
"src/nvs_pagemanager.cpp"
|
||||
"src/nvs_storage.cpp"
|
||||
"src/nvs_types.cpp")
|
||||
if(CONFIG_NVS_ENCRYPTION)
|
||||
list(APPEND srcs "src/nvs_encr.cpp")
|
||||
endif()
|
||||
|
||||
idf_component_register(SRCS "${srcs}"
|
||||
REQUIRES spi_flash mbedtls
|
||||
INCLUDE_DIRS include)
|
||||
|
@ -5,3 +5,7 @@
|
||||
COMPONENT_ADD_INCLUDEDIRS := include
|
||||
|
||||
COMPONENT_SRCDIRS := src
|
||||
|
||||
ifndef CONFIG_NVS_ENCRYPTION
|
||||
COMPONENT_OBJEXCLUDE := src/nvs_encr.o
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user