-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathFindLIBPMEM.cmake
33 lines (26 loc) · 1.12 KB
/
FindLIBPMEM.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Find the libpmem library.
# Output variables:
# LIBPMEM_INCLUDE_DIRS : e.g., /usr/include/.
# LIBPMEM_LIBRARIES : Library path of libpmem
# LIBPMEM_FOUND : True if found.
##_____________________________________________________________________________
## Check for the header files
find_path (LIBPMEM_INCLUDE_DIRS
NAMES libpmem.h
PATH_SUFFIXES include
)
##_____________________________________________________________________________
## Check for the library
find_library (LIBPMEM_LIBRARIES pmem
PATH_SUFFIXES lib64 lib
)
##_____________________________________________________________________________
## Actions taken when all components have been found
find_package_handle_standard_args (LIBPMEM DEFAULT_MSG LIBPMEM_LIBRARIES LIBPMEM_INCLUDE_DIRS)
if (LIBPMEM_FOUND)
message (STATUS "Found components for LIBPMEM")
message (STATUS "LIBPMEM_INCLUDE_DIRS = ${LIBPMEM_INCLUDE_DIRS}")
message (STATUS "LIBPMEM_LIBRARIES = ${LIBPMEM_LIBRARIES}")
else ()
message(FATAL_ERROR "Could not find LIBPMEM, download and install from https://github.com/pmem/pmdk/releases")
endif ()