mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
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:
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -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
|
||||
|
@ -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
1
deps/json
vendored
Submodule
Submodule deps/json added at a34e011e24
@ -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:
|
||||
;
|
||||
};
|
@ -1 +1,3 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <nlohmann/json.hpp>
|
@ -1 +1,3 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <nlohmann/json.hpp>
|
Reference in New Issue
Block a user