# Find gloox library

#
# GLOOX_INCLUDE_DIR
# GLOOX_LIBRARIES
# GLOOX_FOUND

# Copyright (c) 2010 Georg Rudoy <0xd34df00d@gmail.com>

FIND_PATH(GLOOX_INCLUDE_DIR gloox/gloox.h PATH ENV)
FIND_LIBRARY(GLOOX_LIBRARIES NAMES gloox)

IF(GLOOX_LIBRARIES AND GLOOX_INCLUDE_DIR)
	SET(GLOOX_FOUND 1)
ENDIF(GLOOX_LIBRARIES AND GLOOX_INCLUDE_DIR)

IF(GLOOX_FOUND)
	MESSAGE(STATUS "Found Gloox libraries at ${GLOOX_LIBRARIES}")
	MESSAGE(STATUS "Found Gloox headers at ${GLOOX_INCLUDE_DIR}")
ELSE()
	IF(GLOOX_FIND_REQUIRED)
		MESSAGE(FATAL_ERROR "Could NOT find required Gloox library, aborting")
	ELSE()
		MESSAGE(STATUS "Could NOT find Gloox")
	ENDIF()
ENDIF()
