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

include(FetchContent)
FetchContent_Declare(
		IMGUI
		GIT_REPOSITORY	https://github.com/ocornut/imgui
		GIT_TAG origin/docking
)
if(NOT imgui_POPULATED)
	FetchContent_Populate(ImGui)
endif()
set(IMGUI_INCLUDE_DIR "${imgui_SOURCE_DIR}")

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ImGui DEFAULT_MSG IMGUI_INCLUDE_DIR)
if(IMGUI_FOUND)
	set(IMGUI_HEADERS ${ImGui_INCLUDE_DIR})
endif()