# Adds STB using FetchContent.
#
# Defines:
# STB_FOUND: true if the header was found successfully.
# STB_HEADERS (only if STB_FOUND is true): stb files.

include(FetchContent)
FetchContent_Declare(
		STB
		GIT_REPOSITORY	https://github.com/nothings/stb
)
if(NOT stb_POPULATED)
	FetchContent_Populate(STB)
endif()
set(STB_INCLUDE_DIR "${stb_SOURCE_DIR}")

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(STB DEFAULT_MSG STB_INCLUDE_DIR)
if(STB_FOUND)
	set(STB_HEADERS ${STB_INCLUDE_DIR})
endif()