]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: make the linkage to pmem::pmemobj public 39846/head
authorKefu Chai <kchai@redhat.com>
Sat, 6 Mar 2021 07:43:33 +0000 (15:43 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 6 Mar 2021 07:45:17 +0000 (15:45 +0800)
tools/ceph-dencoder/rbd_types.cc includes Types.h which in turn includes
libpmemobj.h via librbd/cache/pwl/Types.h. and ceph-dencoder pulls in the
rbd_type.cc's linked libraries by linking against rbd_types. but before
this change, rbd_types links against pmem::pmemobj as a PRIVATE library.

so, if we want to pull in rbd_types linkage we should always link
rbd_types as a PUBLIC library. as rbd_types include libpmemobj.h in its
header file.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/librbd/CMakeLists.txt

index 0ba78390c8ad3b456cc119e7403a87a001b7d4fb..5fe0c55dfb276c7f28a867e2c391da94b422fd59 100644 (file)
@@ -18,7 +18,7 @@ add_library(rbd_types STATIC
 
 if (WITH_RBD_RWL)
   target_link_libraries(rbd_types
-    PRIVATE pmem::pmemobj)
+    PUBLIC pmem::pmemobj)
 endif()
 
 set(librbd_internal_srcs