]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cmake: find_package(cap) before linking against it 55529/head
authorKefu Chai <tchaikov@gmail.com>
Sun, 11 Feb 2024 08:53:26 +0000 (16:53 +0800)
committerKefu Chai <tchaikov@gmail.com>
Sun, 11 Feb 2024 08:57:38 +0000 (16:57 +0800)
commit0de5755531e890e26c37a184db98b40538d25286
tree93333415671371bdaf59fe618c4b37b669baf1cd
parent8bbeeb80a58adb816caf9ac91bfaae216408e14d
cmake: find_package(cap) before linking against it

before this change, we link against libcap without finding it. this
works fine as long as libcap-devel or libcap-dev is installed in the
system. but if it is not, the source would fail to build due to missing
`sys/capability.h`. this is not a great developer experience.

in this change, a `Findcap.cmake` is added to find the capability
library. which would fail the build at the configure phase.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
cmake/modules/Findcap.cmake [new file with mode: 0644]
src/extblkdev/CMakeLists.txt