mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
base,deps: Replace submodules by prefix/system install
nlohmann JSON, WebSocket++ and Asio are moved from sudmodules to prefix (obs-deps) or system-wide install (Linux).
This commit is contained in:
parent
bf277011f9
commit
78a1b54a47
9
.gitmodules
vendored
9
.gitmodules
vendored
@ -1,12 +1,3 @@
|
|||||||
[submodule "deps/websocketpp"]
|
|
||||||
path = deps/websocketpp
|
|
||||||
url = https://github.com/zaphoyd/websocketpp.git
|
|
||||||
[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
|
|
||||||
[submodule "deps/qr"]
|
[submodule "deps/qr"]
|
||||||
path = deps/qr
|
path = deps/qr
|
||||||
url = https://github.com/nayuki/QR-Code-generator.git
|
url = https://github.com/nayuki/QR-Code-generator.git
|
||||||
|
@ -9,11 +9,7 @@ if(NOT ENABLE_WEBSOCKET OR NOT ENABLE_UI)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Submodule deps check
|
# Submodule deps check
|
||||||
if(NOT
|
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/deps/qr/cpp/QrCode.hpp)
|
||||||
(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/deps/json/CMakeLists.txt
|
|
||||||
AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/deps/websocketpp/CMakeLists.txt
|
|
||||||
AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/deps/qr/cpp/QrCode.hpp
|
|
||||||
AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/deps/asio/asio/include/asio.hpp))
|
|
||||||
obs_status(FATAL_ERROR "obs-websocket submodule deps not available.")
|
obs_status(FATAL_ERROR "obs-websocket submodule deps not available.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -23,11 +19,14 @@ option(PLUGIN_TESTS "Enable plugin runtime tests" OFF)
|
|||||||
# Find Qt
|
# Find Qt
|
||||||
find_qt(COMPONENTS Core Widgets Svg Network)
|
find_qt(COMPONENTS Core Widgets Svg Network)
|
||||||
|
|
||||||
# Find nlohmann
|
# Find nlohmann JSON
|
||||||
set(JSON_BuildTests
|
find_package(nlohmann_json 3 REQUIRED)
|
||||||
OFF
|
|
||||||
CACHE INTERNAL "")
|
# Find WebSocket++
|
||||||
add_subdirectory(deps/json)
|
find_package(Websocketpp 0.8 REQUIRED)
|
||||||
|
|
||||||
|
# Find Asio
|
||||||
|
find_package(Asio 1.12.1 REQUIRED)
|
||||||
|
|
||||||
# Tell websocketpp not to use system boost
|
# Tell websocketpp not to use system boost
|
||||||
add_definitions(-DASIO_STANDALONE)
|
add_definitions(-DASIO_STANDALONE)
|
||||||
@ -128,9 +127,6 @@ target_sources(
|
|||||||
deps/qr/cpp/QrCode.cpp
|
deps/qr/cpp/QrCode.cpp
|
||||||
deps/qr/cpp/QrCode.hpp)
|
deps/qr/cpp/QrCode.hpp)
|
||||||
|
|
||||||
target_include_directories(obs-websocket PRIVATE "deps/asio/asio/include"
|
|
||||||
"deps/websocketpp")
|
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
obs-websocket
|
obs-websocket
|
||||||
PRIVATE OBS::libobs
|
PRIVATE OBS::libobs
|
||||||
@ -139,7 +135,9 @@ target_link_libraries(
|
|||||||
Qt::Widgets
|
Qt::Widgets
|
||||||
Qt::Svg
|
Qt::Svg
|
||||||
Qt::Network
|
Qt::Network
|
||||||
nlohmann_json::nlohmann_json)
|
nlohmann_json::nlohmann_json
|
||||||
|
Websocketpp::Websocketpp
|
||||||
|
Asio::Asio)
|
||||||
|
|
||||||
target_compile_features(obs-websocket PRIVATE cxx_std_17)
|
target_compile_features(obs-websocket PRIVATE cxx_std_17)
|
||||||
|
|
||||||
|
1
deps/asio
vendored
1
deps/asio
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit b73dc1d2c0ecb9452a87c26544d7f71e24342df6
|
|
1
deps/json
vendored
1
deps/json
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit a34e011e24beece3b69397a03fdc650546f052c3
|
|
1
deps/websocketpp
vendored
1
deps/websocketpp
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 56123c87598f8b1dd471be83ca841ceae07f95ba
|
|
Loading…
Reference in New Issue
Block a user