Skip to content

Commit e96b097

Browse files
authored
Merge pull request #14079 from hugueskamba/hk_cmake_kvstore_dependency
CMake: Add Blockdevice dependency to KVstore library
2 parents d6d4fef + 69b4c13 commit e96b097

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

storage/kvstore/CMakeLists.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,36 @@ target_include_directories(mbed-storage-kvstore
1515
include/kvstore
1616
)
1717

18+
if("DATAFLASH" IN_LIST MBED_TARGET_LABELS)
19+
list(APPEND mbed_blockdevice_libs mbed-storage-dataflash)
20+
endif()
21+
22+
if("FLASHIAP" IN_LIST MBED_TARGET_LABELS)
23+
list(APPEND mbed_blockdevice_libs mbed-storage-flashiap)
24+
endif()
25+
26+
if("I2CEE" IN_LIST MBED_TARGET_LABELS)
27+
list(APPEND mbed_blockdevice_libs mbed-storage-i2cee)
28+
endif()
29+
30+
if("OSPIF" IN_LIST MBED_TARGET_LABELS)
31+
list(APPEND mbed_blockdevice_libs mbed-storage-ospif)
32+
endif()
33+
34+
if("QSPIF" IN_LIST MBED_TARGET_LABELS)
35+
list(APPEND mbed_blockdevice_libs mbed-storage-qspif)
36+
endif()
37+
38+
if("SD" IN_LIST MBED_TARGET_LABELS)
39+
list(APPEND mbed_blockdevice_libs mbed-storage-sd)
40+
endif()
41+
42+
if("SPIF" IN_LIST MBED_TARGET_LABELS)
43+
list(APPEND mbed_blockdevice_libs mbed-storage-spif)
44+
endif()
45+
1846
target_link_libraries(mbed-storage-kvstore
1947
INTERFACE
2048
mbed-storage-kv-global-api
49+
${mbed_blockdevice_libs}
2150
)

0 commit comments

Comments
 (0)