From: Kefu Chai Date: Mon, 17 Mar 2025 06:26:18 +0000 (+0800) Subject: cmake: make libcap REQUIRED X-Git-Tag: v20.3.0~341^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=98b70c149d505189e4b000e65b7679b0cca555eb;p=ceph.git cmake: make libcap REQUIRED this header is required when building the extended block device plugins on linux, without it the build fails like: ``` /home/kefu/dev/ceph/src/extblkdev/ExtBlkDevInterface.h:38:10: fatal error: 'sys/capability.h' file not found 38 | #include | ^~~~~~~~~~~~~~~~~~ ``` so, let's mark this package REQUIRED, so that we can fail early when generating the building system. Signed-off-by: Kefu Chai --- diff --git a/src/extblkdev/CMakeLists.txt b/src/extblkdev/CMakeLists.txt index 27e7c23e4942..648e5de9e43c 100644 --- a/src/extblkdev/CMakeLists.txt +++ b/src/extblkdev/CMakeLists.txt @@ -6,9 +6,9 @@ add_subdirectory(vdo) add_library(extblkdev STATIC ExtBlkDevPlugin.cc) -if(NOT WIN32) -find_package(cap) -target_link_libraries(extblkdev cap) +if(LINUX) + find_package(cap REQUIRED) + target_link_libraries(extblkdev cap) endif() add_custom_target(extblkdev_plugins DEPENDS