]> git.proxmox.com Git - ceph.git/blob - ceph/cmake/modules/Findzfs.cmake
update sources to v12.1.1
[ceph.git] / ceph / cmake / modules / Findzfs.cmake
1 # find libzfs or libzfslinux
2 # Once done, this will define
3 #
4 # ZFS_FOUND - system has libzfs
5 # ZFS_INCLUDE_DIR - the libzfs include directories
6 # ZFS_LIBRARIES - link these to use libzfs
7
8 find_package(PkgConfig)
9 if(PKG_CONFIG_FOUND)
10 pkg_check_modules(ZFS QUIET libzfs)
11 else()
12 find_path(ZFS_INCLUDE_DIR libzfs.h
13 HINTS
14 ENV ZFS_DIR
15 PATH_SUFFIXES libzfs)
16
17 find_library(ZFS_LIBRARIES
18 NAMES zfs
19 HINTS
20 ENV ZFS_DIR)
21 set(XFS_LIBRARIES ${LIBXFS})
22 endif()
23
24 include(FindPackageHandleStandardArgs)
25 find_package_handle_standard_args(zfs DEFAULT_MSG
26 ZFS_INCLUDE_DIRS ZFS_LIBRARIES)
27
28 mark_as_advanced(ZFS_INCLUDE_DIRS XFS_LIBRARIES)