FIND_PATH(BTREE_INCLUDE_DIR NAMES btree/memory.h btree/common.h btree/bdb.h)

FIND_LIBRARY(BTREE_LIBRARY NAMES btree)

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(BTREE DEFAULT_MSG BTREE_LIBRARY BTREE_INCLUDE_DIR)
IF(BTREE_FOUND)
SET(BTREE_LIBRARIES ${BTREE_LIBRARY})
SET(BTREE_INCLUDE_DIRS ${BTREE_INCLUDE_DIR})
ELSE(BTREE_FOUND)
SET(BTREE_LIBRARIES)
SET(BTREE_INCLUDE_DIRS)
ENDIF(BTREE_FOUND)
MARK_AS_ADVANCED(BTREE_INCLUDE_DIRS BTREE_LIBRARIES)

