From 8372be3a994ef8e3afc76cff06fcf4353f9c64f7 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Sat, 25 Sep 2021 00:16:27 +0100 Subject: [PATCH] Use FetchContent for nlohmann --- cmake/nlohmann-json.cmake | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cmake/nlohmann-json.cmake b/cmake/nlohmann-json.cmake index f43f3caa5..0114f6254 100644 --- a/cmake/nlohmann-json.cmake +++ b/cmake/nlohmann-json.cmake @@ -1,14 +1,13 @@ -include(ExternalProject) +include(FetchContent) -ExternalProject_Add(nlohmann-json +FetchContent_Declare( + fmtlib + PREFIX "${CMAKE_BINARY_DIR}/deps" DOWNLOAD_DIR "${CMAKE_SOURCE_DIR}/deps/nlohmann/json" DOWNLOAD_NAME json.hpp DOWNLOAD_NO_EXTRACT 1 URL https://github.com/nlohmann/json/releases/download/v3.10.2/json.hpp URL_HASH SHA256=059743e48b37e41579ee3a92e82e984bfa0d2a9a2b20b175d04db8089f46f047 - CMAKE_COMMAND true - BUILD_COMMAND true - INSTALL_COMMAND true ) include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/deps/nlohmann)