2018-06-08 12:59:19 +00:00
|
|
|
# - Find rdma cm
|
|
|
|
# Find the rdma cm library and includes
|
|
|
|
#
|
|
|
|
# RDMACM_INCLUDE_DIR - where to find cma.h, etc.
|
|
|
|
# RDMACM_LIBRARIES - List of libraries when using rdmacm.
|
|
|
|
# RDMACM_FOUND - True if rdmacm found.
|
|
|
|
|
|
|
|
find_path(RDMACM_INCLUDE_DIR rdma/rdma_cma.h)
|
|
|
|
find_library(RDMACM_LIBRARIES rdmacm)
|
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(rdmacm DEFAULT_MSG RDMACM_LIBRARIES RDMACM_INCLUDE_DIR)
|
|
|
|
|
2018-06-28 09:05:53 +00:00
|
|
|
if(RDMACM_FOUND)
|
|
|
|
if(NOT TARGET RDMA::RDMAcm)
|
|
|
|
add_library(RDMA::RDMAcm UNKNOWN IMPORTED)
|
|
|
|
endif()
|
|
|
|
set_target_properties(RDMA::RDMAcm PROPERTIES
|
|
|
|
INTERFACE_INCLUDE_DIRECTORIES "${RDMACM_INCLUDE_DIR}"
|
|
|
|
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
|
|
|
IMPORTED_LOCATION "${RDMACM_LIBRARIES}")
|
|
|
|
endif()
|
|
|
|
|
2018-06-08 12:59:19 +00:00
|
|
|
mark_as_advanced(
|
|
|
|
RDMACM_LIBRARIES
|
|
|
|
)
|