1 # - Try to find LevelDB
2 # Once done, this will define
4 # LevelDB_FOUND - system has LevelDB
5 # LevelDB_INCLUDE_DIRS - the LevelDB include directories
6 # LevleDB_LIBRARIES - link these to use LevelDB
10 # Use pkg-config to get hints about paths
11 libfind_pkg_check_modules(LevelDB_PKGCONF leveldb)
14 find_path(LevelDB_INCLUDE_DIR
16 PATHS ${LevelDB_PKGCONF_INCLUDE_DIRS}
20 # Finally the library itself
21 find_library(LevelDB_LIBRARY
23 PATHS ${LevelDB_PKGCONF_LIBRARY_DIRS}
26 # Set the include dir variables and the libraries and let libfind_process do the rest.
27 # NOTE: Singular variables for this library, plural for libraries this this lib depends on.
28 set(LevelDB_PROCESS_INCLUDES LevelDB_INCLUDE_DIR)
29 set(LevelDB_PROCESS_LIBS LevelDB_LIBRARY)
30 libfind_process(LevelDB)