
# - Find leveldb
# Find the levebdb includes and library
# This module defines
#  LEVELDB_INCLUDE_DIR, where to find jpeglib.h, etc.
#  LEVELDB_LIBRARIES, the libraries needed to use UUID.
#  LEVELDB_FOUND, If false, do not try to use UUID.
# also defined, but not for general use are
#  LEVELDB_LIBRARY, where to find the UUID library.

FIND_PATH(LEVELDB_INCLUDE_DIR leveldb/db.h PATHS ${PROJECT_SOURCE_DIR}/include)

FIND_LIBRARY(LEVELDB_LIBRARIES
  NAMES libleveldb.a
  PATHS ${PROJECT_SOURCE_DIR}/lib
  )

IF (LEVELDB_LIBRARIES AND LEVELDB_INCLUDE_DIR)
  SET(LEVELDB_LIBRARY ${LEVELDB_LIBRARIES})
  SET(LEVELDB_FOUND "YES")
ELSE (LEVELDB_LIBRARIES AND LEVELDB_INCLUDE_DIR)
  SET(LEVELDB_FOUND "NO")
ENDIF (LEVELDB_LIBRARIES AND LEVELDB_INCLUDE_DIR)


#SET (NATIVE_UUID_INCLUDE_PATH ${UUID_INCLUDE_DIR} )
#GET_FILENAME_COMPONENT (NATIVE_UUID_LIB_PATH ${UUID_LIBRARY} PATH)

MARK_AS_ADVANCED(
  LEVELDB_LIBRARY
  LEVELDB_INCLUDE_DIR
  )

MESSAGE(STATUS "LEVELDB_LIBRARY --> " ${LEVELDB_LIBRARY})
MESSAGE(STATUS "LEVELDB_INCLUDE_DIR --> " ${LEVELDB_INCLUDE_DIR})
