1 # Find the ibverbs libraries
3 # The following variables are optionally searched for defaults
4 # IBVERBS_ROOT_DIR: Base directory where all ibverbs components are found
5 # IBVERBS_INCLUDE_DIR: Directory where ibverbs headers are found
6 # IBVERBS_LIB_DIR: Directory where ibverbs libraries are found
8 # The following are set after configuration is done:
10 # IBVERBS_INCLUDE_DIRS
13 FIND_PATH(IBVERBS_INCLUDE_DIRS
14 NAMES infiniband/verbs.h
16 ${IBVERBS_INCLUDE_DIR}
18 ${IBVERBS_ROOT_DIR}/include)
20 FIND_LIBRARY(IBVERBS_LIBRARIES
25 ${IBVERBS_ROOT_DIR}/lib)
27 INCLUDE(FindPackageHandleStandardArgs)
28 FIND_PACKAGE_HANDLE_STANDARD_ARGS(ibverbs DEFAULT_MSG IBVERBS_INCLUDE_DIRS IBVERBS_LIBRARIES)
29 MARK_AS_ADVANCED(IBVERBS_INCLUDE_DIR IBVERBS_LIBRARIES)
31 IF (NOT IBVERBS_LIBRARIES)
32 SET(IBVERBS_FOUND FALSE)
33 MESSAGE(FATAL_ERROR "ibverbs library not found.\nTry: 'sudo yum install libibverbs-devel libibverbs' (or sudo apt-get install libibverbs-dev libibverbs1)")