From f955ec762cdf0cc72e280b927b7378762cf0d06e Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Wed, 8 Aug 2018 14:15:14 +0300 Subject: [PATCH] Use archives instead of repos to fetch dependencies --- CMakeLists.txt | 2 +- deps/CMakeLists.txt | 34 ++++++++++++++++++++++++---------- deps/cmake/MatrixClient.cmake | 5 ++--- deps/cmake/MatrixStructs.cmake | 5 ++--- deps/cmake/SpdLog.cmake | 4 ++-- deps/cmake/Tweeny.cmake | 4 ++-- src/Logging.cpp | 3 ++- 7 files changed, 35 insertions(+), 22 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7fe3ae86..c47c1674 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -231,7 +231,7 @@ find_package(OpenSSL REQUIRED) find_package(MatrixStructs 0.1.0 REQUIRED) find_package(MatrixClient 0.1.0 REQUIRED) find_package(Olm 2 REQUIRED) -find_package(spdlog 0.16.0 CONFIG REQUIRED) +find_package(spdlog 1.0.0 CONFIG REQUIRED) if(NOT LMDBXX_INCLUDE_DIR) find_path(LMDBXX_INCLUDE_DIR diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index 9060d70b..1e079d6f 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -38,26 +38,40 @@ set(BOOST_URL set(BOOST_SHA256 5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9) -set(MATRIX_STRUCTS_URL https://github.com/mujx/matrix-structs) -set(MATRIX_STRUCTS_TAG 8de04afea34e95c14d1dde82af390592dfde90dd) +set( + MATRIX_STRUCTS_URL + https://github.com/mujx/matrix-structs/archive/8de04afea34e95c14d1dde82af390592dfde90dd.tar.gz + ) +set(MATRIX_STRUCTS_HASH + 255a82a9e463261858cd7da18f34fd60d19882ab507d214e47ea47ff78ae68b6) -set(MTXCLIENT_URL https://github.com/mujx/mtxclient) -set(MTXCLIENT_TAG ca66424489b4d3e6ea447b853157fa88f0b849b3) +set( + MTXCLIENT_URL + https://github.com/mujx/mtxclient/archive/10894678e982bc037a0aa4cf650b89a566ccbc52.tar.gz + ) +set(MTXCLIENT_HASH + 9bbb4613e6ed7c9886575221e1820c4aeda302ff29703e9040e53a2d0236c8ea) -set(TWEENY_URL https://github.com/mobius3/tweeny) -set(TWEENY_TAG b94ce07cfb02a0eb8ac8aaf66137dabdaea857cf) +set( + TWEENY_URL + https://github.com/mobius3/tweeny/archive/b94ce07cfb02a0eb8ac8aaf66137dabdaea857cf.tar.gz + ) +set(TWEENY_HASH + 9a632b9da84823fae002ad5d9ba02c8d77c0a3810479974c6b637c5504165475) set( LMDBXX_HEADER_URL https://raw.githubusercontent.com/bendiken/lmdbxx/0b43ca87d8cfabba392dfe884eb1edb83874de02/lmdb%2B%2B.h ) -set(LMDBXX_SHA c57b501a4e8fa1187fa7fd348da415c7685a50a7cb25b17b3f257b9e9426f73d) +set(LMDBXX_HASH + c57b501a4e8fa1187fa7fd348da415c7685a50a7cb25b17b3f257b9e9426f73d) set(OLM_URL https://git.matrix.org/git/olm.git) set(OLM_TAG 4065c8e11a33ba41133a086ed3de4da94dcb6bae) -set(SPDLOG_URL https://github.com/gabime/spdlog) -set(SPDLOG_TAG 560df2878ad308b27873b3cc5e810635d69cfad6) +set(SPDLOG_URL https://github.com/gabime/spdlog/archive/v1.0.0.tar.gz) +set(SPDLOG_HASH + 90d5365121bcd2c41ce94dfe6a460e89507a2dfef6133fe5fad5bb35ac4ef0a1) if(USE_BUNDLED_BOOST) include(Boost) @@ -81,7 +95,7 @@ endif() if(USE_BUNDLED_LMDBXX) file(DOWNLOAD ${LMDBXX_HEADER_URL} ${DEPS_INSTALL_DIR}/include/lmdb++.h - EXPECTED_HASH SHA256=${LMDBXX_SHA}) + EXPECTED_HASH SHA256=${LMDBXX_HASH}) endif() if(WIN32) diff --git a/deps/cmake/MatrixClient.cmake b/deps/cmake/MatrixClient.cmake index cf26f35d..e20c5d22 100644 --- a/deps/cmake/MatrixClient.cmake +++ b/deps/cmake/MatrixClient.cmake @@ -16,9 +16,8 @@ set(BOOST_BUNDLE_ROOT "-DBOOST_ROOT=${DEPS_BUILD_DIR}/boost") ExternalProject_Add( MatrixClient - DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/mtxclient - GIT_REPOSITORY ${MTXCLIENT_URL} - GIT_TAG ${MTXCLIENT_TAG} + URL ${MTXCLIENT_URL} + URL_HASH SHA256=${MTXCLIENT_HASH} BUILD_IN_SOURCE 1 SOURCE_DIR ${DEPS_BUILD_DIR}/mtxclient diff --git a/deps/cmake/MatrixStructs.cmake b/deps/cmake/MatrixStructs.cmake index fd12ad39..adc273d5 100644 --- a/deps/cmake/MatrixStructs.cmake +++ b/deps/cmake/MatrixStructs.cmake @@ -7,9 +7,8 @@ endif() ExternalProject_Add( MatrixStructs - DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/matrix_structs - GIT_REPOSITORY ${MATRIX_STRUCTS_URL} - GIT_TAG ${MATRIX_STRUCTS_TAG} + URL ${MATRIX_STRUCTS_URL} + URL_HASH SHA256=${MATRIX_STRUCTS_HASH} BUILD_IN_SOURCE 1 SOURCE_DIR ${DEPS_BUILD_DIR}/matrix_structs diff --git a/deps/cmake/SpdLog.cmake b/deps/cmake/SpdLog.cmake index 5a5f318c..f4111ed6 100644 --- a/deps/cmake/SpdLog.cmake +++ b/deps/cmake/SpdLog.cmake @@ -7,8 +7,8 @@ endif() ExternalProject_Add( SpdLog - GIT_REPOSITORY ${SPDLOG_URL} - GIT_TAG ${SPDLOG_TAG} + URL ${SPDLOG_URL} + URL_HASH SHA256=${SPDLOG_HASH} BUILD_IN_SOURCE 1 SOURCE_DIR ${DEPS_BUILD_DIR}/spdlog diff --git a/deps/cmake/Tweeny.cmake b/deps/cmake/Tweeny.cmake index 7c5b9748..5a4303f9 100644 --- a/deps/cmake/Tweeny.cmake +++ b/deps/cmake/Tweeny.cmake @@ -7,8 +7,8 @@ endif() ExternalProject_Add( Tweeny - GIT_REPOSITORY ${TWEENY_URL} - GIT_TAG ${TWEENY_TAG} + URL ${TWEENY_URL} + URL_HASH SHA256=${TWEENY_HASH} BUILD_IN_SOURCE 1 SOURCE_DIR ${DEPS_BUILD_DIR}/tweeny diff --git a/src/Logging.cpp b/src/Logging.cpp index 1b2838f3..534447ea 100644 --- a/src/Logging.cpp +++ b/src/Logging.cpp @@ -1,7 +1,8 @@ #include "Logging.h" +#include "spdlog/sinks/rotating_file_sink.h" +#include "spdlog/sinks/stdout_sinks.h" #include -#include namespace { std::shared_ptr db_logger = nullptr;