From 9e8519cdd6262976afe65a66fcfbcc62c937bd0e Mon Sep 17 00:00:00 2001 From: Bassam Tabbara Date: Fri, 4 Nov 2016 18:10:08 -0700 Subject: [PATCH] embedded: Add librbd and librados to embedded ceph This commit add librados, librbd to the embedded ceph static library. This is needed to support daemons built with libcephd that want to run mon commands, create rbd volumes, snapshots etc. Signed-off-by: Bassam Tabbara --- src/libcephd/CMakeLists.txt | 22 ++++++++++++++-------- src/librados/CMakeLists.txt | 6 ++++++ src/librbd/CMakeLists.txt | 5 +++++ 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/libcephd/CMakeLists.txt b/src/libcephd/CMakeLists.txt index 31ce2886834..9ba77fd9527 100644 --- a/src/libcephd/CMakeLists.txt +++ b/src/libcephd/CMakeLists.txt @@ -9,18 +9,24 @@ set_target_properties(cephd_base PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMB set(merge_libs cephd_base - mon - osd + cephd_compressor + cephd_ec + cephd_rados + cephd_rbd + cls_journal_client + cls_lock_client + cls_rbd_client common common_utf8 - os - kv + erasure_code global - rocksdb json_spirit - erasure_code - cephd_compressor - cephd_ec) + kv + mon + os + osd + osdc + rocksdb) if(HAVE_ARMV8_CRC) list(APPEND merge_libs common_crc_aarch64) diff --git a/src/librados/CMakeLists.txt b/src/librados/CMakeLists.txt index a29d1dded9f..3db8ffe72fb 100644 --- a/src/librados/CMakeLists.txt +++ b/src/librados/CMakeLists.txt @@ -34,3 +34,9 @@ else(ENABLE_SHARED) add_library(librados ALIAS rados_a) endif(ENABLE_SHARED) install(TARGETS librados DESTINATION ${CMAKE_INSTALL_LIBDIR}) + +if(WITH_EMBEDDED) + add_library(cephd_rados STATIC + $ + $) +endif() diff --git a/src/librbd/CMakeLists.txt b/src/librbd/CMakeLists.txt index 521f4f74255..10f57cd73c6 100644 --- a/src/librbd/CMakeLists.txt +++ b/src/librbd/CMakeLists.txt @@ -119,3 +119,8 @@ if(ENABLE_SHARED) LINK_FLAGS "-Wl,--exclude-libs,ALL") endif(ENABLE_SHARED) install(TARGETS librbd DESTINATION ${CMAKE_INSTALL_LIBDIR}) + +if(WITH_EMBEDDED) + add_library(cephd_rbd_base STATIC librbd.cc ${CMAKE_SOURCE_DIR}/src/common/ContextCompletion.cc) + merge_static_libraries(cephd_rbd cephd_rbd_base rbd_internal rbd_types journal) +endif() -- 2.39.5