include(FetchContent)

if(NOT DEFINED YAMLCPP_REPO)
    set(YAMLCPP_REPO https://github.com/jbeder/yaml-cpp.git)
endif ()

FetchContent_Declare(
        yaml-cpp
        EXCLUDE_FROM_ALL
        GIT_REPOSITORY ${YAMLCPP_REPO}
        GIT_TAG 0.8.0
        GIT_SHALLOW TRUE
)
set(YAML_CPP_BUILD_TOOLS OFF CACHE BOOL "" FORCE)
set(YAML_CPP_BUILD_TESTS OFF CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(yaml-cpp)