From 4ff0775a226093de9702d63bd387d10894625813 Mon Sep 17 00:00:00 2001 From: Joe Date: Wed, 7 Jul 2021 17:05:39 -0400 Subject: [PATCH 1/4] Get SChannel CURL backend working for coeurl on Windows --- CMakeLists.txt | 3 ++- cmake/Hunter/config.cmake | 49 ++++++++++++++++++++++++++++++++++++--- 2 files changed, 48 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b023d48..355424b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,7 @@ include("cmake/HunterGate.cmake") HunterGate( URL "https://github.com/cpp-pm/hunter/archive/v0.23.305.tar.gz" SHA1 "fc8d7a6dac2fa23681847b3872d88d3839b657b0" + LOCAL ) option(USE_BUNDLED_SPDLOG "Use the bundled version of spdlog." ${HUNTER_ENABLED}) @@ -673,7 +674,7 @@ if(USE_BUNDLED_COEURL) FetchContent_Declare( coeurl GIT_REPOSITORY https://nheko.im/Nheko-Reborn/coeurl.git - GIT_TAG 417821a07cfe4429b08a2efed5e480a498087afd + GIT_TAG e9010d1ce14e7163d1cb5407ed27b23303781796 ) FetchContent_MakeAvailable(coeurl) target_link_libraries(nheko PUBLIC coeurl::coeurl) diff --git a/cmake/Hunter/config.cmake b/cmake/Hunter/config.cmake index 4cdeee97..d7030d41 100644 --- a/cmake/Hunter/config.cmake +++ b/cmake/Hunter/config.cmake @@ -1,9 +1,52 @@ + hunter_config( - Boost - VERSION "1.70.0-p1" - CMAKE_ARGS IOSTREAMS_NO_BZIP2=1 + spdlog + VERSION 1.8.0-p1 ) + +hunter_config( + lmdb + VERSION 0.9.21-p2 +) + +hunter_config( + OpenSSL + VERSION 1.1.1j +) + +hunter_config( + Libevent + VERSION 2.1.8-p4 +) + hunter_config( nlohmann_json + VERSION 3.8.0 CMAKE_ARGS JSON_MultipleHeaders=ON ) + +if (WIN32) + hunter_config( + CURL + VERSION 7.74.0-p2 + CMAKE_ARGS + CMAKE_USE_SCHANNEL=ON + BUILD_CURL_TESTS=OFF + BUILD_CURL_EXE=OFF + CMAKE_USE_OPENSSL=OFF + CMAKE_USE_LIBSSH2=OFF + BUILD_TESTING=OFF + ) +else() + hunter_config( + CURL + VERSION 7.74.0-p2 + CMAKE_ARGS + CMAKE_USE_SCHANNEL=OFF + BUILD_CURL_TESTS=OFF + BUILD_CURL_EXE=OFF + CMAKE_USE_OPENSSL=ON + CMAKE_USE_LIBSSH2=OFF + BUILD_TESTING=OFF + ) +endif() From 9a96a0ba5d624e02aeeac9e5d2782dc56b351561 Mon Sep 17 00:00:00 2001 From: Joe Date: Wed, 7 Jul 2021 22:56:44 -0400 Subject: [PATCH 2/4] Update mtxclient with coeurl fixes --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 355424b3..302dc32d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -380,7 +380,7 @@ if(USE_BUNDLED_MTXCLIENT) FetchContent_Declare( MatrixClient GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git - GIT_TAG 9ecaefe377d4dab688caee186e4a263cb7f105e8 + GIT_TAG 3de33120f6e2ef8e5d29b9a1a1000bfd5eea13b3 ) set(BUILD_LIB_EXAMPLES OFF CACHE INTERNAL "") set(BUILD_LIB_TESTS OFF CACHE INTERNAL "") From d05253a740c18da5979ee76f1f6c50c80e359920 Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 8 Jul 2021 00:39:11 -0400 Subject: [PATCH 3/4] Add missing include to Utils --- src/Utils.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Utils.cpp b/src/Utils.cpp index 562b94fd..7c60fa35 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -16,8 +16,9 @@ #include #include #include - #include + +#include #include #include From d25f020d79166b89145172f22a6a3d0da76af2ac Mon Sep 17 00:00:00 2001 From: Joseph Donofry Date: Thu, 8 Jul 2021 21:07:45 -0400 Subject: [PATCH 4/4] Fix linter issue --- src/Utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utils.cpp b/src/Utils.cpp index 7c60fa35..265b2873 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -14,9 +14,9 @@ #include #include #include +#include #include #include -#include #include #include