File: FindCap.cmake

package info (click to toggle)
openscap 1.4.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 125,040 kB
  • sloc: xml: 527,109; ansic: 91,390; sh: 19,789; python: 2,515; perl: 444; makefile: 49
file content (30 lines) | stat: -rw-r--r-- 718 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# - Try to find the Cap development libraries
# Once done this will define
#
# CAP_FOUND - system has libcap-devel
# CAP_INCLUDE_DIR - cap include directory
# CAP_LIBRARIES - cap (if found) library

if(CAP_INCLUDE_DIR AND CAP_LIBRARIES)
    # Already in cache, be silent
    set(CAP_FIND_QUIETLY TRUE)
endif()

find_path(CAP_INCLUDE_DIR sys/capability.h)
find_library(CAP_LIBRARIES NAMES cap)

if(CAP_INCLUDE_DIR AND CAP_LIBRARIES)
   set(CAP_FOUND TRUE)
endif()

if(CAP_FOUND)
   if(NOT CAP_FIND_QUIETLY)
      message(STATUS "Found Cap: ${CAP_LIBRARIES}")
   endif()
else()
   if(Cap_FIND_REQUIRED)
       message(FATAL_ERROR "Could NOT find Cap")
   endif()
endif()

mark_as_advanced(CAP_INCLUDE_DIR CAP_LIBRARIES)