]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
CMake: link libcephfs the same as librados
authorJohn Spray <john.spray@redhat.com>
Fri, 18 Sep 2015 10:10:36 +0000 (11:10 +0100)
committerJohn Spray <john.spray@redhat.com>
Tue, 5 Jan 2016 00:47:53 +0000 (00:47 +0000)
Things got weird (tcmalloc exceptions) if one used
both libraries from the same process, presumably
because of some of these dependencies.

Signed-off-by: John Spray <john.spray@redhat.com>
src/CMakeLists.txt

index 8d7ca896c05ccc7d46a5904d89582dfe920726a8..76b029631a39f067d15b1ce7dfc391fe0b0b7551 100644 (file)
@@ -832,12 +832,17 @@ if(WITH_LIBCEPHFS)
   add_library(client ${libclient_srcs})
   target_link_libraries(client osdc mds ${LIBEDIT_LIBS})
   set(libcephfs_srcs libcephfs.cc)
-  add_library(cephfs SHARED ${libcephfs_srcs})
+  add_library(cephfs ${CEPH_SHARED} ${libcephfs_srcs}
+    $<TARGET_OBJECTS:cls_references_objs>
+    $<TARGET_OBJECTS:heap_profiler_objs>
+    $<TARGET_OBJECTS:common_util_obj>)
+  target_link_libraries(cephfs PRIVATE client osdc osd os global common cls_lock_client
+    ${BLKID_LIBRARIES}
+    ${CRYPTO_LIBS} ${EXTRALIBS} ${TCMALLOC_LIBS})
 if(${ENABLE_SHARED})
   set_target_properties(cephfs PROPERTIES OUTPUT_NAME cephfs VERSION 1.0.0
     SOVERSION 1)
 endif(${ENABLE_SHARED})
-  target_link_libraries(cephfs client global)
   install(TARGETS cephfs DESTINATION lib)
   install(DIRECTORY
     "${CMAKE_SOURCE_DIR}/src/include/cephfs"