1 # find libzfs or libzfslinux
2 # Once done, this will define
4 # ZFS_FOUND - system has libzfs
5 # ZFS_INCLUDE_DIR - the libzfs include directories
6 # ZFS_LIBRARIES - link these to use libzfs
8 find_package(PkgConfig)
10 pkg_check_modules(ZFS QUIET libzfs)
12 find_path(ZFS_INCLUDE_DIR libzfs.h
17 find_library(ZFS_LIBRARIES
21 set(XFS_LIBRARIES ${LIBXFS})
24 include(FindPackageHandleStandardArgs)
25 find_package_handle_standard_args(zfs DEFAULT_MSG
26 ZFS_INCLUDE_DIRS ZFS_LIBRARIES)
28 mark_as_advanced(ZFS_INCLUDE_DIRS XFS_LIBRARIES)