| 1 |
# - Try to find the Cap development libraries |
| 2 |
# Once done this will define |
| 3 |
# |
| 4 |
# CAP_FOUND - system has libcap-devel |
| 5 |
# CAP_INCLUDE_DIR - cap include directory |
| 6 |
# CAP_LIBRARIES - cap (if found) library |
| 7 |
|
| 8 |
if(CAP_INCLUDE_DIR AND CAP_LIBRARIES) |
| 9 |
# Already in cache, be silent |
| 10 |
set(CAP_FIND_QUIETLY TRUE) |
| 11 |
endif() |
| 12 |
|
| 13 |
find_path(CAP_INCLUDE_DIR sys/capability.h) |
| 14 |
find_library(CAP_LIBRARIES NAMES cap) |
| 15 |
|
| 16 |
if(CAP_INCLUDE_DIR AND CAP_LIBRARIES) |
| 17 |
set(CAP_FOUND TRUE) |
| 18 |
endif() |
| 19 |
|
| 20 |
if(CAP_FOUND) |
| 21 |
if(NOT CAP_FIND_QUIETLY) |
| 22 |
message(STATUS "Found Cap: ${CAP_LIBRARIES}") |
| 23 |
endif() |
| 24 |
else() |
| 25 |
if(Cap_FIND_REQUIRED) |
| 26 |
message(FATAL_ERROR "Could NOT find Cap") |
| 27 |
endif() |
| 28 |
endif() |
| 29 |
|
| 30 |
mark_as_advanced(CAP_INCLUDE_DIR CAP_LIBRARIES) |