# LEECHCRAFT_INCLUDE_DIR
# LEECHCRAFT_LIBRARIES
# LEECHCRAFT_FOUND

FIND_PATH(LEECHCRAFT_INCLUDE_DIR NAMES leechcraft/config.h PATH ENV)
IF (LEECHCRAFT_INCLUDE_DIR)
	SET (LEECHCRAFT_INCLUDE_DIR "${LEECHCRAFT_INCLUDE_DIR}/leechcraft")
ENDIF (LEECHCRAFT_INCLUDE_DIR)
FIND_LIBRARY(_LEECHCRAFT_PI NAMES plugininterface)
FIND_LIBRARY(_LEECHCRAFT_XSD NAMES xmlsettingsdialog)
SET (LEECHCRAFT_LIBRARIES ${_LEECHCRAFT_PI} ${_LEECHCRAFT_XSD})
SET (LEECHCRAFT_USE_FILE "${CMAKE_MODULE_PATH}/UseLeechCraft.cmake")

IF(LEECHCRAFT_INCLUDE_DIR AND _LEECHCRAFT_PI AND _LEECHCRAFT_XSD)
	SET(LEECHCRAFT_FOUND 1)
ENDIF()

IF(LEECHCRAFT_FOUND)
	MESSAGE(STATUS "Found LeechCraft libraries at ${LEECHCRAFT_LIBRARIES}")
	MESSAGE(STATUS "Found LeechCraft headers at ${LEECHCRAFT_INCLUDE_DIR}")
ELSE()
	IF(LEECHCRAFT_FIND_REQUIRED)
		MESSAGE(FATAL_ERROR "Could NOT find required LeechCraft library, aborting")
	ELSE()
		MESSAGE(STATUS "Could NOT find LeechCraft")
	ENDIF()
ENDIF()

SET (LC_PLUGINS_DEST @LC_PLUGINS_DEST@)
SET (LC_TRANSLATIONS_DEST @LC_TRANSLATIONS_DEST@)
SET (LC_SETTINGS_DEST @LC_SETTINGS_DEST@)
SET (LC_INSTALLEDMANIFEST_DEST @LC_INSTALLEDMANIFEST_DEST@)
SET (CMAKE_CXX_FLAGS "@CMAKE_CXX_FLAGS@")
