#  LIBTHRIFT_INCLUDE_DIR - where to find THRIFT.h, etc.
#  LIBTHRIFTL_LIBRARY     - List of libraries when using libthrift.
#  LIBTHRIFT_FOUND       - True if THRIFT found.

#  Read environment variables to find mysql include/lib directories
SET(LIBTHRIFT_INCLUDE_DIR $ENV{THRIFT}/include)
MESSAGE( STATUS "LIBTHRIFT_INCLUDE_DIR:         " ${LIBTHRIFT_INCLUDE_DIR} )
SET(LIBTHRIFTL_LIBRARY $ENV{THRIFT}/lib)
MESSAGE( STATUS "LIBTHRIFTL_LIBRARY:         " ${LIBTHRIFTL_LIBRARY} )

FIND_PATH(LIBTHRIFT_INCLUDE_DIR/thrift Thrift.h)

FIND_LIBRARY(LIBTHRIFTL_LIBRARY thrift)

# handle the QUIETLY and REQUIRED arguments and set Libmysql_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBTHRIFT DEFAULT_MSG LIBTHRIFTL_LIBRARY LIBTHRIFT_INCLUDE_DIR)

MARK_AS_ADVANCED(LIBTHRIFTL_LIBRARY LIBTHRIFT_INCLUDE_DIR)
