]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: make libcap REQUIRED 62334/head
authorKefu Chai <tchaikov@gmail.com>
Mon, 17 Mar 2025 06:26:18 +0000 (14:26 +0800)
committerKefu Chai <tchaikov@gmail.com>
Mon, 17 Mar 2025 09:44:44 +0000 (17:44 +0800)
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 <sys/capability.h>
      |          ^~~~~~~~~~~~~~~~~~
```

so, let's mark this package REQUIRED, so that we can fail early
when generating the building system.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/extblkdev/CMakeLists.txt

index 27e7c23e4942ff29135e95e5f75e79869c7b02b1..648e5de9e43c72fffbcce297da50886e1f0b7658 100644 (file)
@@ -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