mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Update deps for keychain
This commit is contained in:
parent
994c28ea95
commit
15d8eb2b8b
4 changed files with 51 additions and 6 deletions
|
@ -12,3 +12,4 @@ brew "gstreamer"
|
||||||
brew "gst-plugins-base"
|
brew "gst-plugins-base"
|
||||||
brew "gst-plugins-good"
|
brew "gst-plugins-good"
|
||||||
brew "gst-plugins-bad"
|
brew "gst-plugins-bad"
|
||||||
|
brew "qtkeychain"
|
||||||
|
|
|
@ -41,6 +41,8 @@ option(USE_BUNDLED_LMDBXX "Use the bundled version of lmdb++."
|
||||||
${HUNTER_ENABLED})
|
${HUNTER_ENABLED})
|
||||||
option(USE_BUNDLED_TWEENY "Use the bundled version of tweeny."
|
option(USE_BUNDLED_TWEENY "Use the bundled version of tweeny."
|
||||||
${HUNTER_ENABLED})
|
${HUNTER_ENABLED})
|
||||||
|
option(USE_BUNDLED_QTKEYCHAIN "Use the bundled version of Qt5Keychain."
|
||||||
|
${HUNTER_ENABLED})
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
|
@ -136,7 +138,24 @@ endif()
|
||||||
find_package(Qt5 COMPONENTS Core Widgets LinguistTools Concurrent Svg Multimedia Qml QuickControls2 QuickWidgets REQUIRED)
|
find_package(Qt5 COMPONENTS Core Widgets LinguistTools Concurrent Svg Multimedia Qml QuickControls2 QuickWidgets REQUIRED)
|
||||||
find_package(Qt5QuickCompiler)
|
find_package(Qt5QuickCompiler)
|
||||||
find_package(Qt5DBus)
|
find_package(Qt5DBus)
|
||||||
|
|
||||||
|
if (USE_BUNDLED_QTKEYCHAIN)
|
||||||
|
include(FetchContent)
|
||||||
|
FetchContent_Declare(
|
||||||
|
qt5keychain
|
||||||
|
GIT_REPOSITORY https://github.com/frankosterfeld/qtkeychain.git
|
||||||
|
GIT_TAG v0.12.0
|
||||||
|
)
|
||||||
|
if (BUILD_SHARED_LIBS)
|
||||||
|
set(QTKEYCHAIN_STATIC OFF CACHE INTERNAL "")
|
||||||
|
else()
|
||||||
|
set(QTKEYCHAIN_STATIC ON CACHE INTERNAL "")
|
||||||
|
endif()
|
||||||
|
set(BUILD_TEST_APPLICATION OFF CACHE INTERNAL "")
|
||||||
|
FetchContent_MakeAvailable(qt5keychain)
|
||||||
|
else()
|
||||||
find_package(Qt5Keychain REQUIRED)
|
find_package(Qt5Keychain REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
find_package(Qt5MacExtras REQUIRED)
|
find_package(Qt5MacExtras REQUIRED)
|
||||||
|
@ -334,25 +353,25 @@ endif()
|
||||||
find_package(OpenSSL 1.1.0 REQUIRED)
|
find_package(OpenSSL 1.1.0 REQUIRED)
|
||||||
if(USE_BUNDLED_MTXCLIENT)
|
if(USE_BUNDLED_MTXCLIENT)
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
set(BUILD_LIB_EXAMPLES OFF CACHE INTERNAL "")
|
|
||||||
set(BUILD_LIB_TESTS OFF CACHE INTERNAL "")
|
|
||||||
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 ed6315563409ce9d47978ff2a2d771b863e375c5
|
GIT_TAG ce8bc9c3dd6bba432e716f55136133111b0186e7
|
||||||
)
|
)
|
||||||
|
set(BUILD_LIB_EXAMPLES OFF CACHE INTERNAL "")
|
||||||
|
set(BUILD_LIB_TESTS OFF CACHE INTERNAL "")
|
||||||
FetchContent_MakeAvailable(MatrixClient)
|
FetchContent_MakeAvailable(MatrixClient)
|
||||||
else()
|
else()
|
||||||
find_package(MatrixClient 0.3.1 REQUIRED)
|
find_package(MatrixClient 0.3.1 REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
if(USE_BUNDLED_OLM)
|
if(USE_BUNDLED_OLM)
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
set(OLM_TESTS OFF CACHE INTERNAL "")
|
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
Olm
|
Olm
|
||||||
GIT_REPOSITORY https://gitlab.matrix.org/matrix-org/olm.git
|
GIT_REPOSITORY https://gitlab.matrix.org/matrix-org/olm.git
|
||||||
GIT_TAG 3.1.4
|
GIT_TAG 3.1.4
|
||||||
)
|
)
|
||||||
|
set(OLM_TESTS OFF CACHE INTERNAL "")
|
||||||
FetchContent_MakeAvailable(Olm)
|
FetchContent_MakeAvailable(Olm)
|
||||||
else()
|
else()
|
||||||
find_package(Olm 3)
|
find_package(Olm 3)
|
||||||
|
@ -574,6 +593,11 @@ else()
|
||||||
endif()
|
endif()
|
||||||
target_include_directories(nheko PRIVATE src includes third_party/blurhash third_party/cpp-httplib-0.5.12)
|
target_include_directories(nheko PRIVATE src includes third_party/blurhash third_party/cpp-httplib-0.5.12)
|
||||||
|
|
||||||
|
# Fixup bundled keychain include dirs
|
||||||
|
if (USE_BUNDLED_QTKEYCHAIN)
|
||||||
|
target_include_directories(nheko PRIVATE ${qt5keychain_SOURCE_DIR} ${qt5keychain_BINARY_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
target_link_libraries(nheko PRIVATE
|
target_link_libraries(nheko PRIVATE
|
||||||
MatrixClient::MatrixClient
|
MatrixClient::MatrixClient
|
||||||
Boost::iostreams
|
Boost::iostreams
|
||||||
|
|
|
@ -94,6 +94,22 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"config-opts": [
|
||||||
|
"-DCMAKE_BUILD_TYPE=Release",
|
||||||
|
"-DBUILD_TEST_APPLICATION=OFF"
|
||||||
|
],
|
||||||
|
"buildsystem": "cmake-ninja",
|
||||||
|
"name": "QtKeychain",
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"commit": "815fe610353ff8ad7e2f1121c368a74df8db5eb7",
|
||||||
|
"tag": "v0.12.0",
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/frankosterfeld/qtkeychain.git"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"config-opts":[
|
"config-opts":[
|
||||||
"-DJSON_BuildTests=OFF"
|
"-DJSON_BuildTests=OFF"
|
||||||
|
@ -145,7 +161,7 @@
|
||||||
"name": "mtxclient",
|
"name": "mtxclient",
|
||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
"commit": "ed6315563409ce9d47978ff2a2d771b863e375c5",
|
"commit": "ce8bc9c3dd6bba432e716f55136133111b0186e7",
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/Nheko-Reborn/mtxclient.git"
|
"url": "https://github.com/Nheko-Reborn/mtxclient.git"
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,11 @@
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
|
||||||
|
#if __has_include(<keychain.h>)
|
||||||
|
#include <keychain.h>
|
||||||
|
#else
|
||||||
#include <qt5keychain/keychain.h>
|
#include <qt5keychain/keychain.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <mtx/responses/common.hpp>
|
#include <mtx/responses/common.hpp>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue