3 # Find the native CAP includes and library
5 # CAP_INCLUDE_DIRS - where to find cap.h, etc.
6 # CAP_LIBRARIES - List of libraries when using cap.
7 # CAP_FOUND - True if cap found.
11 # Already in cache, be silent
12 SET(CAP_FIND_QUIETLY TRUE)
13 ENDIF (CAP_INCLUDE_DIRS)
15 find_package(PkgConfig)
16 pkg_search_module(CAP libcap)
18 FIND_PATH(CAP_INCLUDE_DIR sys/capability.h
19 HINTS ${CAP_INCLUDEDIR}
23 FIND_LIBRARY(CAP_LIBRARY NAMES ${CAP_NAMES}
27 # handle the QUIETLY and REQUIRED arguments and set CAP_FOUND to TRUE if
28 # all listed variables are TRUE
29 INCLUDE(FindPackageHandleStandardArgs)
30 FIND_PACKAGE_HANDLE_STANDARD_ARGS(CAP DEFAULT_MSG CAP_LIBRARY CAP_INCLUDE_DIR)
33 SET( CAP_LIBRARIES ${CAP_LIBRARY} )
34 SET( CAP_INCLUDE_DIRS ${CAP_INCLUDE_DIR} )
37 SET( CAP_INCLUDE_DIRS )
40 MARK_AS_ADVANCED( CAP_LIBRARIES CAP_INCLUDE_DIRS )