diff --git a/storage/kvstore/CMakeLists.txt b/storage/kvstore/CMakeLists.txt index 06cded8582..2f32123f2d 100644 --- a/storage/kvstore/CMakeLists.txt +++ b/storage/kvstore/CMakeLists.txt @@ -15,7 +15,36 @@ target_include_directories(mbed-storage-kvstore include/kvstore ) +if("DATAFLASH" IN_LIST MBED_TARGET_LABELS) + list(APPEND mbed_blockdevice_libs mbed-storage-dataflash) +endif() + +if("FLASHIAP" IN_LIST MBED_TARGET_LABELS) + list(APPEND mbed_blockdevice_libs mbed-storage-flashiap) +endif() + +if("I2CEE" IN_LIST MBED_TARGET_LABELS) + list(APPEND mbed_blockdevice_libs mbed-storage-i2cee) +endif() + +if("OSPIF" IN_LIST MBED_TARGET_LABELS) + list(APPEND mbed_blockdevice_libs mbed-storage-ospif) +endif() + +if("QSPIF" IN_LIST MBED_TARGET_LABELS) + list(APPEND mbed_blockdevice_libs mbed-storage-qspif) +endif() + +if("SD" IN_LIST MBED_TARGET_LABELS) + list(APPEND mbed_blockdevice_libs mbed-storage-sd) +endif() + +if("SPIF" IN_LIST MBED_TARGET_LABELS) + list(APPEND mbed_blockdevice_libs mbed-storage-spif) +endif() + target_link_libraries(mbed-storage-kvstore INTERFACE mbed-storage-kv-global-api + ${mbed_blockdevice_libs} )