FetchContent_MakeAvailable (#3351)

* 🔧 use FetchContent_MakeAvailable

* 💚 fix test names
This commit is contained in:
Niels Lohmann authored and GitHub committed 2022-03-06 15:33:05 +01:00
1 parent d1e57df48b
commit c6d8892e5d
6 files changed
+48 -18

No files matched your search

+2 -9
View File
@@ -100,15 +100,8 @@ automatically download a release as a dependency at configure type.
include(FetchContent)
FetchContent_Declare(json
URL https://github.com/nlohmann/json/releases/download/v3.10.5/json.tar.xz
)
FetchContent_GetProperties(json)
if(NOT json_POPULATED)
FetchContent_Populate(json)
add_subdirectory(${json_SOURCE_DIR} ${json_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()
FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.10.5/json.tar.xz)
FetchContent_MakeAvailable(json)
add_executable(example example.cpp)
target_link_libraries(example PRIVATE nlohmann_json::nlohmann_json)