Merge pull request #14079 from hugueskamba/hk_cmake_kvstore_dependency

CMake: Add Blockdevice dependency to KVstore library
pull/14108/head
Martin Kojtal 2021-01-04 09:28:32 +01:00 committed by GitHub
commit e96b0977cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 29 additions and 0 deletions

View File

@ -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}
)