From 417725801c25561ed3ac316a71aa332847623913 Mon Sep 17 00:00:00 2001 From: tytan652 Date: Thu, 20 Apr 2023 14:48:06 +0200 Subject: [PATCH] base,deps,src: Replace qr submodule by prefix/system install --- .gitmodules | 3 --- CMakeLists.txt | 13 +++++-------- cmake/legacy.cmake | 15 ++++++--------- deps/qr | 1 - src/forms/ConnectInfo.cpp | 2 +- 5 files changed, 12 insertions(+), 22 deletions(-) delete mode 160000 deps/qr diff --git a/.gitmodules b/.gitmodules index 13d395ad..e69de29b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "deps/qr"] - path = deps/qr - url = https://github.com/nayuki/QR-Code-generator.git diff --git a/CMakeLists.txt b/CMakeLists.txt index dfdc194c..b4ceb0b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,17 +11,15 @@ if(NOT ENABLE_WEBSOCKET) return() endif() -# Submodule deps check -if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/deps/qr/cpp/QrCode.hpp") - message(FATAL_ERROR "obs-websocket submodule deps not available.") -endif() - # Find Qt find_qt(COMPONENTS Core Widgets Svg Network) # Find nlohmann JSON find_package(nlohmann_json 3 REQUIRED) +# Find qrcodegencpp +find_package(Libqrcodegencpp REQUIRED) + # Find WebSocket++ find_package(Websocketpp 0.8 REQUIRED) @@ -124,8 +122,6 @@ target_sources( src/utils/Platform.h src/utils/Utils.h) -target_sources(obs-websocket PRIVATE deps/qr/cpp/QrCode.cpp deps/qr/cpp/QrCode.hpp) - configure_file(src/plugin-macros.h.in plugin-macros.generated.h) target_sources(obs-websocket PRIVATE plugin-macros.generated.h) @@ -154,7 +150,8 @@ target_link_libraries( Qt::Network nlohmann_json::nlohmann_json Websocketpp::Websocketpp - Asio::Asio) + Asio::Asio + Libqrcodegencpp::Libqrcodegencpp) set_target_properties_obs( obs-websocket diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index 4790a084..8c90c56d 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -8,11 +8,6 @@ if(NOT ENABLE_WEBSOCKET OR NOT ENABLE_UI) return() endif() -# Submodule deps check -if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/deps/qr/cpp/QrCode.hpp) - obs_status(FATAL_ERROR "obs-websocket submodule deps not available.") -endif() - # Plugin tests flag option(PLUGIN_TESTS "Enable plugin runtime tests" OFF) @@ -22,6 +17,9 @@ find_qt(COMPONENTS Core Widgets Svg Network) # Find nlohmann JSON find_package(nlohmann_json 3 REQUIRED) +# Find qrcodegencpp +find_package(Libqrcodegencpp REQUIRED) + # Find WebSocket++ find_package(Websocketpp 0.8 REQUIRED) @@ -127,9 +125,7 @@ target_sources( src/utils/Platform.h src/utils/Compat.cpp src/utils/Compat.h - src/utils/Utils.h - deps/qr/cpp/QrCode.cpp - deps/qr/cpp/QrCode.hpp) + src/utils/Utils.h) target_link_libraries( obs-websocket @@ -141,7 +137,8 @@ target_link_libraries( Qt::Network nlohmann_json::nlohmann_json Websocketpp::Websocketpp - Asio::Asio) + Asio::Asio + Libqrcodegencpp::Libqrcodegencpp) target_compile_features(obs-websocket PRIVATE cxx_std_17) diff --git a/deps/qr b/deps/qr deleted file mode 160000 index 8518684c..00000000 --- a/deps/qr +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8518684c0f33d004fa93971be2c6a8eca3167d1e diff --git a/src/forms/ConnectInfo.cpp b/src/forms/ConnectInfo.cpp index ddb979d2..02442f00 100644 --- a/src/forms/ConnectInfo.cpp +++ b/src/forms/ConnectInfo.cpp @@ -21,9 +21,9 @@ with this program. If not, see #include #include #include +#include #include "ConnectInfo.h" -#include "../../deps/qr/cpp/QrCode.hpp" #include "../obs-websocket.h" #include "../Config.h" #include "../utils/Platform.h"