Merge pull request #12769 from bachp/cmake-keyutils

cmake: search for Keyutils in default paths

Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2017-01-05 20:49:46 +08:00 committed by GitHub
commit 752ef9bfde

View File

@ -9,17 +9,12 @@ if(KEYUTILS_INCLUDE_DIR AND KEYUTILS_LIBRARIES)
set(KEYUTILS_FIND_QUIETLY TRUE)
endif(KEYUTILS_INCLUDE_DIR AND KEYUTILS_LIBRARIES)
INCLUDE(CheckCXXSymbolExists)
# include dir
find_path(KEYUTILS_INCLUDE_DIR keyutils.h NO_DEFAULT_PATH PATHS
/usr/include
find_path(KEYUTILS_INCLUDE_DIR keyutils.h PATHS
/opt/local/include
/usr/local/include
)
# finally the library itself
find_library(LIBKEYUTILS NAMES keyutils)
set(KEYUTILS_LIBRARIES ${LIBKEYUTILS})