From: Kefu Chai Date: Sat, 6 Mar 2021 07:43:33 +0000 (+0800) Subject: cmake: make the linkage to pmem::pmemobj public X-Git-Tag: v16.2.0~126^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=75889e8e6309183cab079f55fd2dfa9affe15f34;p=ceph.git cmake: make the linkage to pmem::pmemobj public 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 (cherry picked from commit a7e86a0d4463e5c1d4b614d7596df99eed4e42c5) --- diff --git a/src/librbd/CMakeLists.txt b/src/librbd/CMakeLists.txt index 512cef995b8..b7bd51b1d57 100644 --- a/src/librbd/CMakeLists.txt +++ b/src/librbd/CMakeLists.txt @@ -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