From 923370bb1142cfc9c341c5b581077518077e2148 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 15 Aug 2018 00:01:02 +0800 Subject: [PATCH] cmake: expose libos from libosd * expose "os" from "osd" so its consumers do not need to link against "os". * remove "${LEVELDB_LIBRARIES}" from "osd", as "osd" does not reference leveldb directly. the only consumer of leveldb is "kv". Signed-off-by: Kefu Chai --- src/CMakeLists.txt | 2 +- src/osd/CMakeLists.txt | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f8fbf601c22168..d789e1ae42e059 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -506,7 +506,7 @@ set(ceph_osd_srcs ceph_osd.cc) add_executable(ceph-osd ${ceph_osd_srcs}) add_dependencies(ceph-osd erasure_code_plugins) -target_link_libraries(ceph-osd osd os global-static common +target_link_libraries(ceph-osd osd global-static common ${BLKID_LIBRARIES}) if(WITH_FUSE) target_link_libraries(ceph-osd ${FUSE_LIBRARIES}) diff --git a/src/osd/CMakeLists.txt b/src/osd/CMakeLists.txt index afeaed0a3e5d89..3e7435114fb23c 100644 --- a/src/osd/CMakeLists.txt +++ b/src/osd/CMakeLists.txt @@ -43,10 +43,9 @@ endif() add_library(osd STATIC ${osd_srcs} $ $) -target_link_libraries(osd PRIVATE - os dmclock heap_profiler cpu_profiler - ${LEVELDB_LIBRARIES} - ${CMAKE_DL_LIBS}) +target_link_libraries(osd + PUBLIC os + PRIVATE dmclock heap_profiler cpu_profiler ${CMAKE_DL_LIBS}) if(WITH_LTTNG) add_dependencies(osd osd-tp pg-tp) endif()