deps: Add nlohmann json

I decided to go with nlohmann::json because it supports both JSON and
msgpack. I'm likely going to have to write some conversion utils to
convert between obs_data_t and json, but the advantages of what
nlohmann::json brings to the table are just too attractive.
This commit is contained in:
tt2468
2021-04-27 09:46:00 -07:00
parent a0162caad1
commit 107d3cce09
6 changed files with 21 additions and 3 deletions

3
.gitmodules vendored
View File

@ -4,3 +4,6 @@
[submodule "deps/asio"]
path = deps/asio
url = https://github.com/chriskohlhoff/asio.git
[submodule "deps/json"]
path = deps/json
url = https://github.com/nlohmann/json.git

View File

@ -51,6 +51,11 @@ find_package(LibObs REQUIRED)
find_package(Qt5 REQUIRED COMPONENTS Core Widgets Concurrent)
# Find nlohmann
set(JSON_BuildTests OFF CACHE INTERNAL "")
add_subdirectory(deps/json)
# Configure files
configure_file(
src/plugin-macros.h.in
@ -99,7 +104,8 @@ target_link_libraries(obs-websocket
libobs
Qt5::Core
Qt5::Widgets
Qt5::Concurrent)
Qt5::Concurrent
nlohmann_json::nlohmann_json)
# Windows-specific build settings and tasks

1
deps/json vendored Submodule

Submodule deps/json added at a34e011e24

View File

@ -1,6 +1,7 @@
#pragma once
#include <QObject>
#include <nlohmann/json.hpp>
#include "requesthandler/RequestHandler.h"
@ -10,4 +11,7 @@ class WebSocketServer : public QObject
public:
;
private:
;
};

View File

@ -1 +1,3 @@
#pragma once
#pragma once
#include <nlohmann/json.hpp>

View File

@ -1 +1,3 @@
#pragma once
#pragma once
#include <nlohmann/json.hpp>