include(FetchContent)

if(NOT DEFINED GLFW_REPO)
    set(GLFW_REPO https://github.com/glfw/glfw.git)
endif ()

FetchContent_Declare(
        glfw
        EXCLUDE_FROM_ALL
        GIT_REPOSITORY ${GLFW_REPO}
        GIT_TAG 3.3.8
        GIT_SHALLOW TRUE
)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
if(APPLE)
	set(GLFW_VULKAN_STATIC ON CACHE BOOL "" FORCE)
endif()
FetchContent_MakeAvailable(glfw)
set(glfw_FOUND ON PARENT_SCOPE)
