find_path(LEVELDB_INCLUDENAMESleveldb/db.hPATHS$ENV{LEVELDB_ROOT}/include/opt/local/include/usr/local/include/usr/includeDOC"Path in which the file leveldb/db.h is located.")
mark_as_advanced(LEVELDB_INCLUDE)
# Look for the library.
# Does this work on UNIX systems? (LINUX)
find_library(LEVELDB_LIBSNAMESleveldbPATHS/usr/lib$ENV{LEVELDB_ROOT}/libDOC"Path to leveldb library.")
mark_as_advanced(LEVELDB_LIBS)
# Copy the results to the output variables.
if(LEVELDB_INCLUDEANDLEVELDB_LIBS)
message(STATUS"Found leveldb in ${LEVELDB_INCLUDE} ${LEVELDB_LIBS}")
set(LEVELDB_FOUND1)
include(CheckCXXSourceCompiles)
set(CMAKE_REQUIRED_LIBRARY${LEVELDB_LIBS}pthread)
set(CMAKE_REQUIRED_INCLUDES${LEVELDB_INCLUDE})
else()
set(LEVELDB_FOUND0)
endif()
# Report the results.
if(NOTLEVELDB_FOUND)
set(LEVELDB_DIR_MESSAGE"LEVELDB was not found. Make sure LEVELDB_LIBS and LEVELDB_INCLUDE are set.")