ceph/cmake/modules/Findgenl.cmake
Mike Christie 8815671553 cmake and build: add netlink lib requirement detection
The next patch adds netlink support to rbd-nbd. This patch just adds the
build related changes to bring in the netlink lib and test and build
against it.

Signed-off-by: Mike Christie <mchristi@redhat.com>
2019-06-04 23:56:53 -05:00

24 lines
588 B
CMake

# - Find libnl-genl3
# Find the genl library and includes
#
# GENL_INCLUDE_DIR - where to find netlink.h, etc.
# GENL_LIBRARIES - List of libraries when using genl.
# GENL_FOUND - True if genl found.
find_path(GENL_INCLUDE_DIR NAMES netlink/netlink.h PATH_SUFFIXES libnl3)
find_library(LIBNL_LIB nl-3)
find_library(LIBNL_GENL_LIB nl-genl-3)
set(GENL_LIBRARIES
${LIBNL_LIB}
${LIBNL_GENL_LIB}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(nl-genl-3
DEFAULT_MSG GENL_LIBRARIES GENL_INCLUDE_DIR)
mark_as_advanced(
GENL_LIBRARIES
GENL_INCLUDE_DIR)