Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / cmake / modules / Findkeyutils.cmake
1 # Try to find Keyutils
2 # Once done, this will define
3 #
4 # KEYUTILS_FOUND - system has keyutils
5 # KEYUTILS_INCLUDE_DIR - the keyutils include directories
6 # KEYUTILS_LIBRARIES - link these to use keyutils
7
8 if(KEYUTILS_INCLUDE_DIR AND KEYUTILS_LIBRARIES)
9         set(KEYUTILS_FIND_QUIETLY TRUE)
10 endif(KEYUTILS_INCLUDE_DIR AND KEYUTILS_LIBRARIES)
11
12 # include dir
13 find_path(KEYUTILS_INCLUDE_DIR keyutils.h PATHS
14   /opt/local/include
15   /usr/local/include
16 )
17
18 # finally the library itself
19 find_library(LIBKEYUTILS NAMES keyutils)
20 set(KEYUTILS_LIBRARIES ${LIBKEYUTILS})
21
22 # handle the QUIETLY and REQUIRED arguments and set KEYUTILS_FOUND to TRUE if
23 # all listed variables are TRUE
24 include(FindPackageHandleStandardArgs)
25 find_package_handle_standard_args(keyutils DEFAULT_MSG KEYUTILS_LIBRARIES KEYUTILS_INCLUDE_DIR)
26
27 mark_as_advanced(KEYUTILS_LIBRARIES KEYUTILS_INCLUDE_DIR)