From e6918187568dbd01842d8d1d2c808ce16a894239 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 13:54:28 +0200 Subject: Adding upstream version 18.2.2. Signed-off-by: Daniel Baumann --- src/blk/CMakeLists.txt | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 src/blk/CMakeLists.txt (limited to 'src/blk/CMakeLists.txt') diff --git a/src/blk/CMakeLists.txt b/src/blk/CMakeLists.txt new file mode 100644 index 000000000..288955dd0 --- /dev/null +++ b/src/blk/CMakeLists.txt @@ -0,0 +1,67 @@ +if(WITH_BLUESTORE OR WITH_RBD_SSD_CACHE) +list(APPEND libblk_srcs + BlockDevice.cc) +endif() + +if(HAVE_LIBAIO OR HAVE_POSIXAIO) + list(APPEND libblk_srcs + kernel/KernelDevice.cc + kernel/io_uring.cc + aio/aio.cc) +endif() + +if(WITH_BLUESTORE_PMEM) + list(APPEND libblk_srcs + pmem/PMEMDevice.cc) +endif() + +if(WITH_SPDK) + list(APPEND libblk_srcs + spdk/NVMEDevice.cc) +endif() + +if(WITH_ZBD) + list(APPEND libblk_srcs + zoned/HMSMRDevice.cc) +endif() + +if(libblk_srcs) + add_library(blk STATIC ${libblk_srcs}) + target_include_directories(blk PRIVATE "./") +endif() + +if(HAVE_LIBAIO) + target_link_libraries(blk PUBLIC ${AIO_LIBRARIES} extblkdev) +endif(HAVE_LIBAIO) + +if(WITH_SPDK) + target_link_libraries(blk + PRIVATE spdk::spdk) +endif() + +if(WITH_ZBD) + target_link_libraries(blk PRIVATE ${ZBD_LIBRARIES}) +endif() + +if(WITH_BLUESTORE_PMEM) + if(HAVE_LIBDML) + target_link_libraries(blk PRIVATE dml::dml dml::dmlhl) + endif() + + target_link_libraries(blk + PRIVATE pmdk::pmem) +endif() + +if(WITH_EVENTTRACE) + add_dependencies(blk eventtrace_tp) +endif() + +if(WITH_LIBURING) + if(WITH_SYSTEM_LIBURING) + find_package(uring REQUIRED) + else() + include(Builduring) + build_uring() + endif() + target_link_libraries(blk PRIVATE uring::uring) +endif() -- cgit v1.2.3