# Find leveldb

find_path(_LEVELDB_INCLUDE_DIR leveldb/db.h 
	PATHS 
		$ENV{A17_ROOT}/src/vendor/leveldb/include
		)

find_library(_LEVELDB_LIBRARY NAMES leveldb PATHS $ENV{A17_ROOT}/src/vendor/leveldb/out-static)

set(LEVELDB_INCLUDE_DIRS ${_LEVELDB_INCLUDE_DIR} ${LEVELDB_INCLUDE_DIRS})
set(LEVELDB_LIBRARIES ${_LEVELDB_LIBRARY} ${LEVELDB_LIBRARIES})

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LEVELDB DEFAULT_MSG LEVELDB_INCLUDE_DIRS LEVELDB_LIBRARIES)

if(LEVELDB_FOUND)
	set(FOUND TRUE)
endif()
