SET(K3D_XML_FOUND 0)

MESSAGE(STATUS "checking for package 'EXPAT'")
FIND_PACKAGE(EXPAT)
IF(EXPAT_FOUND)
	ADD_DEFINITIONS(-DK3D_HAVE_EXPAT)
	SET(K3D_XML_INCLUDE_DIR ${EXPAT_INCLUDE_DIRS})
	SET(K3D_XML_LIB ${EXPAT_LIBRARIES})
	SET(K3D_XML_FOUND 1)
	MESSAGE(STATUS "  found EXPAT")
ELSE()
	MESSAGE(STATUS "  package 'EXPAT' not found")
	MESSAGE(STATUS "checking for package 'LibXml2'")
	FIND_PACKAGE(LibXml2)
	IF(LIBXML2_FOUND)
		ADD_DEFINITIONS(-DK3D_HAVE_LIBXML2)
		SET(K3D_XML_INCLUDE_DIR ${LIBXML2_INCLUDE_DIR})
		SET(K3D_XML_LIB ${LIBXML2_LIBRARIES})
		SET(K3D_XML_FOUND 1)
		MESSAGE(STATUS "  found LibXml2")
	ELSE()
		MESSAGE(STATUS "  package 'LibXml2' not found")
	ENDIF()
ENDIF()
