]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
embedded: Add librbd and librados to embedded ceph
authorBassam Tabbara <bassam.tabbara@quantum.com>
Sat, 5 Nov 2016 01:10:08 +0000 (18:10 -0700)
committerBassam Tabbara <bassam.tabbara@quantum.com>
Tue, 29 Nov 2016 07:48:02 +0000 (23:48 -0800)
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 <bassam.tabbara@quantum.com>
src/libcephd/CMakeLists.txt
src/librados/CMakeLists.txt
src/librbd/CMakeLists.txt

index 31ce2886834a2f32d8b35593c2d33529dc59ca63..9ba77fd95279b3be2fa205f5700d380f976a0654 100644 (file)
@@ -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)
index a29d1dded9ffe8f2819d64bf4797ef7691e4f257..3db8ffe72fbbc2f076536909fe3da7da9973f038 100644 (file)
@@ -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
+    $<TARGET_OBJECTS:librados_api_obj>
+    $<TARGET_OBJECTS:librados_objs>)
+endif()
index 521f4f742557d1cef5cd50e0bbb13d78b8bb7170..10f57cd73c69cb9bcd6842e781b2bf7f52091ac2 100644 (file)
@@ -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()