diff --git a/.gitmodules b/.gitmodules index a1cd7e3e..8e802a76 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 67062727..5411cb7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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" diff --git a/third-party/nlohmann-json b/third-party/nlohmann-json new file mode 160000 index 00000000..db78ac1d --- /dev/null +++ b/third-party/nlohmann-json @@ -0,0 +1 @@ +Subproject commit db78ac1d7716f56fc9f1b030b715f872f93964e4