2021-05-19 14:26:26 +02:00
|
|
|
if(PMEM_LIBRARIES)
|
|
|
|
set(PMEM_FOUND TRUE)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
if(DEFINED PMEM_LIBRARIES)
|
|
|
|
set(PMEM_FOUND FALSE)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2021-08-31 14:04:09 +02:00
|
|
|
find_path(PMEM_INCLUDE_DIRS NAMES libpmem.h)
|
CMake cleanup
- use FIND_PACKAGE(LIBAIO) to find libaio
- Use standard CMake conventions in Find{PMEM,URING}.cmake
- Drop the LIB from LIB{PMEM,URING}_{INCLUDE_DIR,LIBRARIES}
It is cleaner, and consistent with how other packages are handled in CMake.
e.g successful FIND_PACKAGE(PMEM) now sets PMEM_FOUND, PMEM_LIBRARIES,
PMEM_INCLUDE_DIR, not LIBPMEM_{FOUND,LIBRARIES,INCLUDE_DIR}.
- Decrease the output. use FIND_PACKAGE with QUIET argument.
- for Linux packages, either liburing, or libaio is required
If liburing is installed, libaio does not need to be present .
Use FIND_PACKAGE([LIBAIO|URING] REQUIRED) if either library is required.
2021-03-23 09:41:50 +01:00
|
|
|
find_library(PMEM_LIBRARIES NAMES pmem)
|
2021-03-20 16:23:47 +02:00
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
|
|
|
|
PMEM DEFAULT_MSG
|
2021-08-31 14:04:09 +02:00
|
|
|
PMEM_LIBRARIES PMEM_INCLUDE_DIRS)
|
2021-03-20 16:23:47 +02:00
|
|
|
|
2021-08-31 14:04:09 +02:00
|
|
|
mark_as_advanced(PMEM_INCLUDE_DIRS PMEM_LIBRARIES)
|