ceph/cmake/modules/Findlibnbd.cmake
Effi Ofer dc8eed68ce librbd/migration: add nbd stream
Co-authored-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Effi Ofer <effio@il.ibm.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-09-06 14:14:12 +02:00

34 lines
689 B
CMake

# - Find libnbd
# Sets the following:
#
# LIBNBD_INCLUDE_DIR
# LIBNBD_LIBRARIES
# LIBNBD_VERSION
# LIBNBD_FOUND
find_package(PkgConfig QUIET REQUIRED)
pkg_search_module(PC_libnbd libnbd)
find_path(LIBNBD_INCLUDE_DIR
NAMES libnbd.h
PATHS ${PC_libnbd_INCLUDE_DIRS})
find_library(LIBNBD_LIBRARIES
NAMES libnbd.so
PATHS ${PC_libnbd_LIBRARY_DIRS})
set(LIBNBD_VERSION ${PC_libnbd_VERSION})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(libnbd
REQUIRED_VARS
LIBNBD_INCLUDE_DIR
LIBNBD_LIBRARIES
VERSION_VAR LIBNBD_VERSION)
mark_as_advanced(
LIBNBD_LIBRARIES
LIBNBD_INCLUDE_DIR
LIBNBD_VERSION)