TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags
[wireshark-sm.git] / cmake / modules / FindCAP.cmake
blob0ed69f671fbc70b9de4d6e18ae5e003e0c277054
2 # - Find capabilities
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.
10 IF (CAP_INCLUDE_DIRS)
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}
22 SET(CAP_NAMES cap)
23 FIND_LIBRARY(CAP_LIBRARY NAMES ${CAP_NAMES}
24   HINTS ${CAP_LIBDIR}
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)
32 IF(CAP_FOUND)
33   SET( CAP_LIBRARIES ${CAP_LIBRARY} )
34   SET( CAP_INCLUDE_DIRS ${CAP_INCLUDE_DIR} )
35 ELSE(CAP_FOUND)
36   SET( CAP_LIBRARIES )
37   SET( CAP_INCLUDE_DIRS )
38 ENDIF(CAP_FOUND)
40 MARK_AS_ADVANCED( CAP_LIBRARIES CAP_INCLUDE_DIRS )