cmake: Add optional dependency nlohmann::json

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2020-09-09 05:04:42 +02:00 committed by Michael Fabian Dirks
parent 34ae5dd64b
commit 08b2847fec
3 changed files with 16 additions and 0 deletions

3
.gitmodules vendored
View file

@ -4,3 +4,6 @@
[submodule "third-party/nvidia-arsdk"]
path = third-party/nvidia-arsdk
url = https://github.com/NVIDIA/BROADCAST-AR-SDK.git
[submodule "third-party/nlohmann-json"]
path = third-party/nlohmann-json
url = https://github.com/nlohmann/json.git

View file

@ -467,6 +467,11 @@ if(REQUIRE_CURL)
endif()
endif()
# JSON
if(REQUIRE_JSON)
set(JSON_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/third-party/nlohmann-json/single_include")
endif()
################################################################################
# Code
################################################################################
@ -523,6 +528,13 @@ if(REQUIRE_CURL)
)
endif()
## Dependency: nlohmann_json
if(REQUIRE_JSON)
list(APPEND PROJECT_INCLUDE_DIRS
${JSON_INCLUDE_DIR}
)
endif()
## Data & Source
list(APPEND PROJECT_DATA
"data/locale/en-US.ini"

1
third-party/nlohmann-json vendored Submodule

@ -0,0 +1 @@
Subproject commit db78ac1d7716f56fc9f1b030b715f872f93964e4