if(AVFILTER_INCLUDE_DIR AND AVFILTER_LIBRARIES)
	unset(AVFILTER_INCLUDE_DIR)
	unset(AVFILTER_LIBRARIES)
endif()

if (AVFILTER_ROOT)
	find_path(AVFILTER_INCLUDE_DIR libavfilter/avfilter.h PATHS ${AVFILTER_ROOT})
	find_library(AVFILTER_LIBRARIES NAMES avfilter avfilter.7 PATHS ${AVFILTER_ROOT})
else()
	find_path(AVFILTER_INCLUDE_DIR libavfilter/avfilter.h)
	find_library(AVFILTER_LIBRARIES NAMES avfilter avfilter.7)
endif()

if(AVFILTER_INCLUDE_DIR AND AVFILTER_LIBRARIES)
	set(AVFILTER_FOUND ON)
endif()

if(AVFILTER_FOUND)
	if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
		MESSAGE(STATUS "Found ${CMAKE_FIND_PACKAGE_NAME} include:  ${AVFILTER_INCLUDE_DIR}")
		MESSAGE(STATUS "Found ${CMAKE_FIND_PACKAGE_NAME} library: ${AVFILTER_LIBRARIES}")
	endif()
else()
	if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
		MESSAGE(FATAL_ERROR "Could NOT find ${CMAKE_FIND_PACKAGE_NAME} development files")
	endif()
endif()