# - Try to find the libevhtp
# Once done this will define

# LIBEVHTP_FOUND - System has libevhtp
# LIBEVHTP_INCLUDE_DIR - the libevhtp include directory
# LIBEVHTP_LIBRARY 0 The library needed to use libevhtp

FIND_PATH(LIBEVHTP_INCLUDE_DIR NAMES evhtp.h PATHS "${CMAKE_CURRENT_SOURCE_DIR}/include")
FIND_LIBRARY(LIBEVHTP_LIBRARY NAMES evhtp PATHS "${CMAKE_CURRENT_SOURCE_DIR}/lib" /usr/lib /usr/local/lib)

IF(LIBEVHTP_INCLUDE_DIR AND LIBEVHTP_LIBRARY)
	SET(LIBEVHTP_FOUND 1)
ELSE (LIBEVHTP_INCLUDE_DIR AND LIBEVHTP_LIBRARY)
	SET(LIBEVHTP_FOUND 0)
ENDIF (LIBEVHTP_INCLUDE_DIR AND LIBEVHTP_LIBRARY)

# Report the results.
IF (NOT LIBEVHTP_FOUND)
    SET(LIBEVHTP_DIR_MESSAGE "Libevhtp was not found.")
ENDIF (NOT LIBEVHTP_FOUND)

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(libevhtp DEFAULT_MSG LIBEVHTP_LIBRARY LIBEVHTP_INCLUDE_DIR)
MARK_AS_ADVANCED(LIBEVHTP_INCLUDE_DIR LIBEVHTP_LIBRARY)

