mirror of
https://github.com/nlohmann/json.git
synced 2025-07-29 23:01:16 +03:00
FetchContent_MakeAvailable (#3351)
* 🔧 use FetchContent_MakeAvailable * 💚 fix test names
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user