find_path(STB_IMAGE_INCLUDE_DIR stb_image.h PATH_SUFFIXES stb)

find_path(STB_IMAGE_RESIZE2_INCLUDE_DIR stb_image_resize2.h PATH_SUFFIXES stb)
if(STB_IMAGE_RESIZE2_INCLUDE_DIR)
	set(STB_IMAGE_RESIZE_VERSION 2)
else()
	find_path(STB_IMAGE_RESIZE_INCLUDE_DIR stb_image_resize.h PATH_SUFFIXES stb)
	if(STB_IMAGE_RESIZE_INCLUDE_DIR)
		set(STB_IMAGE_RESIZE_VERSION 1)
	endif()
endif()

include(FindPackageHandleStandardArgs)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(
		StbImage
		REQUIRED_VARS STB_IMAGE_INCLUDE_DIR STB_IMAGE_RESIZE_VERSION
)
