]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | # Try to find xfs |
2 | # Once done, this will define | |
3 | # | |
224ce89b WB |
4 | # XFS_FOUND - system has libxfs |
5 | # XFS_INCLUDE_DIR - the libxfs include directories | |
6 | # XFS_LIBRARIES - link these to use libxfs | |
7c673cae FG |
7 | |
8 | if(XFS_INCLUDE_DIR AND XFS_LIBRARIES) | |
9 | set(XFS_FIND_QUIETLY TRUE) | |
10 | endif(XFS_INCLUDE_DIR AND XFS_LIBRARIES) | |
11 | ||
12 | INCLUDE(CheckCXXSymbolExists) | |
13 | ||
14 | # include dir | |
15 | ||
16 | find_path(XFS_INCLUDE_DIR xfs.h NO_DEFAULT_PATH PATHS | |
17 | /usr/include | |
18 | /usr/include/xfs | |
19 | /opt/local/include | |
20 | /usr/local/include | |
21 | ) | |
22 | ||
23 | ||
24 | # finally the library itself | |
25 | find_library(LIBXFS NAMES handle) | |
26 | set(XFS_LIBRARIES ${LIBXFS}) | |
27 | ||
28 | # handle the QUIETLY and REQUIRED arguments and set XFS_FOUND to TRUE if | |
29 | # all listed variables are TRUE | |
30 | include(FindPackageHandleStandardArgs) | |
31 | find_package_handle_standard_args(xfs DEFAULT_MSG XFS_LIBRARIES XFS_INCLUDE_DIR) | |
32 | ||
33 | mark_as_advanced(XFS_LIBRARIES XFS_INCLUDE_DIR) |