diff --git a/CMakeLists.txt b/CMakeLists.txt index c8065e54f22..d5dc2b96b28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -196,6 +196,10 @@ include(CMakeDependentOption) CMAKE_DEPENDENT_OPTION(WITH_ZBD "Enable libzbd bluestore backend" OFF "WITH_BLUESTORE" OFF) +if(WITH_ZBD) + find_package(zbd) + set(HAVE_LIBZBD ${ZBD_FOUND}) +endif() CMAKE_DEPENDENT_OPTION(WITH_LIBURING "Enable io_uring bluestore backend" OFF "WITH_BLUESTORE;HAVE_LIBAIO" OFF) diff --git a/src/blk/CMakeLists.txt b/src/blk/CMakeLists.txt index bbbe62ff133..63be2ecfcf6 100644 --- a/src/blk/CMakeLists.txt +++ b/src/blk/CMakeLists.txt @@ -21,8 +21,6 @@ if(WITH_SPDK) endif() if(WITH_ZBD) - find_package(zbd REQUIRED) - set(HAVE_LIBZBD ${ZBD_FOUND}) list(APPEND libblk_srcs zoned/HMSMRDevice.cc) endif()