if (NLJSON_EXTERNAL)
    find_package(nlohmann_json REQUIRED)
else()
    if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/include/nlohmann/json.hpp")
        message(STATUS "Downloading nlohmann-json from GitHub, use -DNLJSON_EXTERNAL to prevent")
        file(DOWNLOAD "https://github.com/nlohmann/json/releases/download/v3.7.3/json.hpp" "${CMAKE_CURRENT_BINARY_DIR}/include/nlohmann/json.hpp")
    else()
        message(STATUS "Using existing nlohmann-json")
    endif()
endif()
