-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathFindLMDB.cmake
29 lines (22 loc) · 1.03 KB
/
FindLMDB.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
# Try to find the LMBD libraries and headers
# LMDB_FOUND - system has LMDB lib
# LMDB_INCLUDE_DIR - the LMDB include directory
# LMDB_LIBRARIES - Libraries needed to use LMDB
# FindCWD based on FindGMP by:
# SPDX-FileCopyrightText: 2006 Laurent Montel <[email protected]>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# Adapted from FindCWD by:
# SPDX-FileCopyrightText: 2013 Conrad Steenberg <[email protected]>
# Aug 31, 2013
if (LMDB_INCLUDE_DIRS AND LMDB_LIBRARIES)
# Already in cache, be silent
set(LMDB_FIND_QUIETLY TRUE)
endif (LMDB_INCLUDE_DIRS AND LMDB_LIBRARIES)
find_path(LMDB_INCLUDE_DIRS NAMES "lmdb.h" HINTS "$ENV{LMDB_DIR}/include")
find_library(LMDB_LIBRARIES NAMES lmdb liblmdb HINTS $ENV{LMDB_DIR}/lib )
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LMDB DEFAULT_MSG LMDB_INCLUDE_DIRS LMDB_LIBRARIES)
mark_as_advanced(LMDB_INCLUDE_DIRS LMDB_LIBRARIES)
MESSAGE(STATUS "LMDB lib: " ${LMDB_LIBRARIES} )
MESSAGE(STATUS "LMDB include: " ${LMDB_INCLUDE_DIRS} )