mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-21 18:50:47 +03:00
Enable http/3 support
This commit is contained in:
parent
30bbfeaea6
commit
5b929c9d1a
3 changed files with 16 additions and 9 deletions
|
@ -25,9 +25,9 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL "compile as PIC by default")
|
||||||
option(HUNTER_ENABLED "Enable Hunter package manager" OFF)
|
option(HUNTER_ENABLED "Enable Hunter package manager" OFF)
|
||||||
include("cmake/HunterGate.cmake")
|
include("cmake/HunterGate.cmake")
|
||||||
HunterGate(
|
HunterGate(
|
||||||
URL "https://github.com/cpp-pm/hunter/archive/v0.24.3.tar.gz"
|
URL "https://github.com/cpp-pm/hunter/archive/v0.24.8.tar.gz"
|
||||||
SHA1 "10738b59e539818a01090e64c2d09896247530c7"
|
SHA1 "ca7838dded9a1811b04ffd56175f629e0af82d3d"
|
||||||
LOCAL
|
LOCAL
|
||||||
)
|
)
|
||||||
|
|
||||||
macro(hunter_add_package_safe)
|
macro(hunter_add_package_safe)
|
||||||
|
@ -186,7 +186,7 @@ if(USE_BUNDLED_COEURL)
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
coeurl
|
coeurl
|
||||||
GIT_REPOSITORY https://nheko.im/Nheko-Reborn/coeurl.git
|
GIT_REPOSITORY https://nheko.im/Nheko-Reborn/coeurl.git
|
||||||
GIT_TAG v0.2.1
|
GIT_TAG f989f3c54c1ca15e29c5bd6b1ce4efbcb3fd8078
|
||||||
)
|
)
|
||||||
FetchContent_MakeAvailable(coeurl)
|
FetchContent_MakeAvailable(coeurl)
|
||||||
set(COEURL_TARGET_NAME coeurl::coeurl)
|
set(COEURL_TARGET_NAME coeurl::coeurl)
|
||||||
|
@ -595,7 +595,7 @@ if(USE_BUNDLED_MTXCLIENT)
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
MatrixClient
|
MatrixClient
|
||||||
GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git
|
GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git
|
||||||
GIT_TAG a1b7b81ce00ef5808eac0fdd895a95044e1b07ed
|
GIT_TAG c7a13e79289ae35c4e2a9bccb3fdeb2bc03a925d
|
||||||
)
|
)
|
||||||
set(BUILD_LIB_EXAMPLES OFF CACHE INTERNAL "")
|
set(BUILD_LIB_EXAMPLES OFF CACHE INTERNAL "")
|
||||||
set(BUILD_LIB_TESTS OFF CACHE INTERNAL "")
|
set(BUILD_LIB_TESTS OFF CACHE INTERNAL "")
|
||||||
|
|
|
@ -170,8 +170,8 @@ modules:
|
||||||
- -Ddefault_library=static
|
- -Ddefault_library=static
|
||||||
name: coeurl
|
name: coeurl
|
||||||
sources:
|
sources:
|
||||||
- commit: cfeae3acef061dbb19706f462ee58b9be2e6ec76
|
- commit: f989f3c54c1ca15e29c5bd6b1ce4efbcb3fd8078
|
||||||
tag: v0.2.1
|
#tag: v0.2.1
|
||||||
type: git
|
type: git
|
||||||
url: https://nheko.im/nheko-reborn/coeurl.git
|
url: https://nheko.im/nheko-reborn/coeurl.git
|
||||||
- config-opts:
|
- config-opts:
|
||||||
|
@ -182,7 +182,7 @@ modules:
|
||||||
buildsystem: cmake-ninja
|
buildsystem: cmake-ninja
|
||||||
name: mtxclient
|
name: mtxclient
|
||||||
sources:
|
sources:
|
||||||
- commit: a1b7b81ce00ef5808eac0fdd895a95044e1b07ed
|
- commit: c7a13e79289ae35c4e2a9bccb3fdeb2bc03a925d
|
||||||
#tag: v0.8.2
|
#tag: v0.8.2
|
||||||
type: git
|
type: git
|
||||||
url: https://github.com/Nheko-Reborn/mtxclient.git
|
url: https://github.com/Nheko-Reborn/mtxclient.git
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
#include <QMetaType>
|
#include <QMetaType>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
#include <QStandardPaths>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
#include "nlohmann/json.hpp"
|
#include "nlohmann/json.hpp"
|
||||||
|
@ -33,7 +34,13 @@ namespace http {
|
||||||
mtx::http::Client *
|
mtx::http::Client *
|
||||||
client()
|
client()
|
||||||
{
|
{
|
||||||
static auto client_ = std::make_shared<mtx::http::Client>();
|
static auto client_ = [] {
|
||||||
|
auto c = std::make_shared<mtx::http::Client>();
|
||||||
|
c->alt_svc_cache_path((QStandardPaths::writableLocation(QStandardPaths::CacheLocation) +
|
||||||
|
"/curl_alt_svc_cache.txt")
|
||||||
|
.toStdString());
|
||||||
|
return c;
|
||||||
|
}();
|
||||||
return client_.get();
|
return client_.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue