mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-05 13:44:32 +02:00
fix(nvs): CMakeLists.txt adopted for nvs_host_test v4.4
This commit is contained in:
@@ -1,5 +1,12 @@
|
|||||||
idf_build_get_property(target IDF_TARGET)
|
idf_build_get_property(target IDF_TARGET)
|
||||||
|
|
||||||
|
if(${target} STREQUAL "linux")
|
||||||
|
list(APPEND requires "spi_flash")
|
||||||
|
else()
|
||||||
|
list(APPEND requires "spi_flash")
|
||||||
|
list(APPEND requires "newlib")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(srcs "src/nvs_api.cpp"
|
set(srcs "src/nvs_api.cpp"
|
||||||
"src/nvs_cxx_api.cpp"
|
"src/nvs_cxx_api.cpp"
|
||||||
"src/nvs_item_hash_list.cpp"
|
"src/nvs_item_hash_list.cpp"
|
||||||
@@ -15,8 +22,7 @@ set(srcs "src/nvs_api.cpp"
|
|||||||
"src/nvs_platform.cpp")
|
"src/nvs_platform.cpp")
|
||||||
|
|
||||||
idf_component_register(SRCS "${srcs}"
|
idf_component_register(SRCS "${srcs}"
|
||||||
REQUIRES "esp_partition"
|
REQUIRES "${requires}"
|
||||||
PRIV_REQUIRES spi_flash newlib
|
|
||||||
INCLUDE_DIRS "include"
|
INCLUDE_DIRS "include"
|
||||||
PRIV_INCLUDE_DIRS "private_include")
|
PRIV_INCLUDE_DIRS "private_include")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user