diff --git a/.gitmodules b/.gitmodules index c8e2a167..6fac0a2e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,3 +22,6 @@ [submodule "deps/cpp-httplib"] path = deps/cpp-httplib url = https://github.com/yhirose/cpp-httplib.git +[submodule "deps/json"] + path = deps/json + url = https://github.com/nlohmann/json.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 969abb2b..d05c94ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -378,6 +378,12 @@ target_include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/deps/obs-websocket/lib" "${CMAKE_CURRENT_SOURCE_DIR}/deps/exprtk") +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/deps/json/CMakeLists.txt") + add_subdirectory(deps/json) +else() + find_package(nlohmann_json REQUIRED) +endif() +target_link_libraries(${LIB_NAME} PUBLIC nlohmann_json::nlohmann_json) target_compile_definitions(${LIB_NAME} PRIVATE ADVSS_EXPORT_SYMBOLS=1) # --- End of section --- diff --git a/deps/json b/deps/json new file mode 160000 index 00000000..bc889afb --- /dev/null +++ b/deps/json @@ -0,0 +1 @@ +Subproject commit bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d