From df98da7cf9ae8b90a1d8f490584b99e278d0b818 Mon Sep 17 00:00:00 2001 From: Tobias Ribizel Date: Wed, 19 Apr 2023 13:14:50 +0200 Subject: [PATCH] support older CMake --- third_party/nlohmann_json/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/third_party/nlohmann_json/CMakeLists.txt b/third_party/nlohmann_json/CMakeLists.txt index 77064c66c40..ca60ef3ee0d 100644 --- a/third_party/nlohmann_json/CMakeLists.txt +++ b/third_party/nlohmann_json/CMakeLists.txt @@ -6,4 +6,8 @@ FetchContent_Declare( GIT_TAG bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d ) set(JSON_BuildTests OFF CACHE INTERNAL "") -FetchContent_MakeAvailable(nlohmann_json) +FetchContent_GetProperties(nlohmann_json) +if(NOT nlohmann_json_POPULATED) + FetchContent_Populate(nlohmann_json) + add_subdirectory(${nlohmann_json_SOURCE_DIR} ${nlohmann_json_BINARY_DIR} EXCLUDE_FROM_ALL) +endif()