# remote block storage
option(WITH_RBD "Remote block storage is here" ON)
+# KERNEL remote block storage
+option(WITH_KRBD "Kernel Remote block storage is here" ON)
+
+if(WITH_KRBD AND WITHOUT_RBD)
+ message(FATAL_ERROR "Cannot have WITH_KRBD with WITH_RBD.")
+endif()
+
# embedded ceph daemon static library
# NOTE: Ceph is mostly LGPL (see COPYING), which means that
# static linking brings with it restrictions. Please be sure
CHECK_FUNCTION_EXISTS(mallinfo HAVE_MALLINFO)
endif()
-if(WITH_LIBCEPHFS OR WITH_RBD)
+if(WITH_LIBCEPHFS OR WITH_KRBD)
find_package(keyutils REQUIRED)
endif()
set(DENCODER_EXTRALIBS
${DENCODER_EXTRALIBS}
cls_rbd_client
- krbd
rbd_types
rbd_replay_types)
+ if(WITH_KRBD)
+ set(DENCODER_EXTRALIBS
+ ${DENCODER_EXTRALIBS}
+ krbd)
+ endif()
endif(WITH_RBD)
add_executable(ceph-dencoder ${dencoder_srcs})
add_subdirectory(bash_completion)
-if(WITH_LIBCEPHFS OR WITH_RBD)
+if(WITH_LIBCEPHFS OR WITH_KRBD)
set(parse_secret_files
common/secret.c)
add_library(parse_secret_objs OBJECT ${parse_secret_files})
add_subdirectory(journal)
-if(${WITH_RBD})
- add_library(krbd STATIC krbd.cc
- $<TARGET_OBJECTS:parse_secret_objs>)
- target_link_libraries(krbd ${KEYUTILS_LIBRARIES} ${UDEV_LIBRARIES})
+if(WITH_RBD)
+ if(WITH_KRBD)
+ add_library(krbd STATIC krbd.cc
+ $<TARGET_OBJECTS:parse_secret_objs>)
+ target_link_libraries(krbd ${KEYUTILS_LIBRARIES} ${UDEV_LIBRARIES})
+ endif()
add_subdirectory(librbd)
if(WITH_FUSE)
add_subdirectory(rbd_fuse)
${CMAKE_SOURCE_DIR}/src/rbdmap
DESTINATION ${CMAKE_INSTALL_BINDIR})
add_subdirectory(rbd_replay)
-endif(${WITH_RBD})
+endif(WITH_RBD)
# RadosGW
if(WITH_KVS)
pthread
${CMAKE_DL_LIBS}
${EXTRALIBS})
+if(HAVE_UDEV)
+ target_link_libraries(librbd LINK_PRIVATE
+ udev)
+endif()
if(ENABLE_SHARED)
set_target_properties(librbd PROPERTIES
OUTPUT_NAME rbd
if(WITH_RBD)
add_subdirectory(rbd)
add_subdirectory(rbd_mirror)
- add_subdirectory(rbd_nbd)
+ if(LINUX)
+ add_subdirectory(rbd_nbd)
+ endif()
endif(WITH_RBD)
set_target_properties(rbd PROPERTIES OUTPUT_NAME rbd)
target_link_libraries(rbd librbd librados
cls_journal_client cls_rbd_client
- krbd
rbd_types
journal
ceph-common global
${Boost_REGEX_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}
${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
+if(WITH_KRBD)
+ target_link_libraries(rbd
+ krbd)
+endif()
+
install(TARGETS rbd DESTINATION bin)