Skip to content

Commit 4dea638

Browse files
committed
external: add nlohmann_json v3.11.2
Single header downloaded from https://github.com/nlohmann/json/releases/tag/v3.11.2 Add a custom CMakeLists.txt to have a `nlohmann_json::nlohmann_json` target to link against (just like the full project)
1 parent 9841601 commit 4dea638

File tree

2 files changed

+24610
-0
lines changed

2 files changed

+24610
-0
lines changed

external/nlohmann_json/CMakeLists.txt

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
project(nlohmann_json LANGUAGES CXX VERSION 3.11.2)
2+
3+
add_library(nlohmann_json INTERFACE)
4+
5+
target_include_directories(nlohmann_json
6+
SYSTEM INTERFACE
7+
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
8+
)
9+
# Enable extended diagnostics information
10+
# https://github.com/nlohmann/json/releases/tag/v3.10.0
11+
target_compile_definitions(nlohmann_json INTERFACE JSON_DIAGNOSTICS=1)
12+
13+
# provide a namespaced alias for clients to 'link' against if nlohman_json is included as a sub-project
14+
add_library(nlohmann_json::nlohmann_json ALIAS nlohmann_json)

0 commit comments

Comments
 (0)