From 4be4a038ccd17aab0a4cc85200a6a0b41e1cccf2 Mon Sep 17 00:00:00 2001 From: Arthur Sonzogni Date: Wed, 29 Apr 2020 21:08:39 +0200 Subject: [PATCH] Apply suggestions from code review Co-Authored-By: Niels Lohmann --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d6e947581..e9eb7553b 100644 --- a/README.md +++ b/README.md @@ -134,12 +134,13 @@ target_link_libraries(foo PRIVATE nlohmann_json::nlohmann_json) ``` ##### Embedded (FetchContent) + Since CMake v3.11, [FetchContent](https://cmake.org/cmake/help/v3.11/module/FetchContent.html) can -be used to automatically download the repository as a dependency. +be used to automatically download the repository as a dependency at configure type. Example: -~~~cmake +```cmake include(FetchContent) FetchContent_Declare(json @@ -153,11 +154,10 @@ if(NOT json_POPULATED) endif() target_link_libraries(foo PRIVATE nlohmann_json::nlohmann_json) -~~~ **Note**: The repository https://github.com/nlohmann/json download size is huge. It contains all the dataset used for the benchmarks. You might want to depend on -a smaller repository. For instance, you might want to replace the URL above by: +a smaller repository. For instance, you might want to replace the URL above by https://github.com/ArthurSonzogni/nlohmann_json_cmake_fetchcontent #### Supporting Both