Update dependencies

This commit is contained in:
Nicolas Werner 2020-07-01 00:46:44 +02:00
parent 21a1f249f9
commit d72eb5eb2d
5 changed files with 51 additions and 42 deletions

View file

@ -71,7 +71,6 @@ cmake -GNinja -H. -Bbuild \
-DHUNTER_ROOT=".hunter" \ -DHUNTER_ROOT=".hunter" \
-DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF \ -DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DHUNTER_CONFIGURATION_TYPES=RelWithDebInfo \ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHUNTER_CONFIGURATION_TYPES=RelWithDebInfo \
-DUSE_BUNDLED_OPENSSL=OFF \
-DCI_BUILD=ON -DCI_BUILD=ON
fi fi
cmake --build build cmake --build build

View file

@ -18,10 +18,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.23.244.tar.gz" URL "https://github.com/cpp-pm/hunter/archive/v0.23.260.tar.gz"
SHA1 "2c0f491fd0b80f7b09e3d21adb97237161ef9835" SHA1 "13775235910a3fa85644568d1c5be8271de72e1c"
LOCAL )
)
option(USE_BUNDLED_BOOST "Use the bundled version of Boost." ${HUNTER_ENABLED}) option(USE_BUNDLED_BOOST "Use the bundled version of Boost." ${HUNTER_ENABLED})
option(USE_BUNDLED_SPDLOG "Use the bundled version of spdlog." option(USE_BUNDLED_SPDLOG "Use the bundled version of spdlog."
@ -328,7 +327,7 @@ find_package(Boost 1.70 REQUIRED
if(USE_BUNDLED_OPENSSL) if(USE_BUNDLED_OPENSSL)
hunter_add_package(OpenSSL) hunter_add_package(OpenSSL)
endif() endif()
find_package(OpenSSL 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_EXAMPLES OFF CACHE INTERNAL "")
@ -336,7 +335,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 68e043e1bf515e9072235151f74f7aac0838a9d3 GIT_TAG eddd95a896fad0c51fc800741d82bbc43fc6d41e
) )
FetchContent_MakeAvailable(MatrixClient) FetchContent_MakeAvailable(MatrixClient)
else() else()

View file

@ -1,5 +1,5 @@
hunter_config( hunter_config(
Boost Boost
VERSION "1.70.0-p0" VERSION "1.70.0-p1"
CMAKE_ARGS IOSTREAMS_NO_BZIP2=1 CMAKE_ARGS IOSTREAMS_NO_BZIP2=1
) )

View file

@ -133,10 +133,14 @@ function(hunter_gate_self root version sha1 result)
string(SUBSTRING "${sha1}" 0 7 archive_id) string(SUBSTRING "${sha1}" 0 7 archive_id)
set( if(EXISTS "${root}/cmake/Hunter")
hunter_self set(hunter_self "${root}")
"${root}/_Base/Download/Hunter/${version}/${archive_id}/Unpacked" else()
) set(
hunter_self
"${root}/_Base/Download/Hunter/${version}/${archive_id}/Unpacked"
)
endif()
set("${result}" "${hunter_self}" PARENT_SCOPE) set("${result}" "${hunter_self}" PARENT_SCOPE)
endfunction() endfunction()
@ -490,37 +494,44 @@ macro(HunterGate)
) )
set(_master_location "${_hunter_self}/cmake/Hunter") set(_master_location "${_hunter_self}/cmake/Hunter")
get_filename_component(_archive_id_location "${_hunter_self}/.." ABSOLUTE) if(EXISTS "${HUNTER_GATE_ROOT}/cmake/Hunter")
set(_done_location "${_archive_id_location}/DONE") # Hunter downloaded manually (e.g. by 'git clone')
set(_sha1_location "${_archive_id_location}/SHA1") set(_unused "xxxxxxxxxx")
set(HUNTER_GATE_SHA1 "${_unused}")
set(HUNTER_GATE_VERSION "${_unused}")
else()
get_filename_component(_archive_id_location "${_hunter_self}/.." ABSOLUTE)
set(_done_location "${_archive_id_location}/DONE")
set(_sha1_location "${_archive_id_location}/SHA1")
# Check Hunter already downloaded by HunterGate # Check Hunter already downloaded by HunterGate
if(NOT EXISTS "${_done_location}") if(NOT EXISTS "${_done_location}")
hunter_gate_download("${_archive_id_location}") hunter_gate_download("${_archive_id_location}")
endif() endif()
if(NOT EXISTS "${_done_location}") if(NOT EXISTS "${_done_location}")
hunter_gate_internal_error("hunter_gate_download failed") hunter_gate_internal_error("hunter_gate_download failed")
endif() endif()
if(NOT EXISTS "${_sha1_location}") if(NOT EXISTS "${_sha1_location}")
hunter_gate_internal_error("${_sha1_location} not found") hunter_gate_internal_error("${_sha1_location} not found")
endif() endif()
file(READ "${_sha1_location}" _sha1_value) file(READ "${_sha1_location}" _sha1_value)
string(COMPARE EQUAL "${_sha1_value}" "${HUNTER_GATE_SHA1}" _is_equal) string(COMPARE EQUAL "${_sha1_value}" "${HUNTER_GATE_SHA1}" _is_equal)
if(NOT _is_equal) if(NOT _is_equal)
hunter_gate_internal_error( hunter_gate_internal_error(
"Short SHA1 collision:" "Short SHA1 collision:"
" ${_sha1_value} (from ${_sha1_location})" " ${_sha1_value} (from ${_sha1_location})"
" ${HUNTER_GATE_SHA1} (HunterGate)" " ${HUNTER_GATE_SHA1} (HunterGate)"
) )
endif() endif()
if(NOT EXISTS "${_master_location}") if(NOT EXISTS "${_master_location}")
hunter_gate_user_error( hunter_gate_user_error(
"Master file not found:" "Master file not found:"
" ${_master_location}" " ${_master_location}"
"try to update Hunter/HunterGate" "try to update Hunter/HunterGate"
) )
endif()
endif() endif()
include("${_master_location}") include("${_master_location}")
set_property(GLOBAL PROPERTY HUNTER_GATE_DONE YES) set_property(GLOBAL PROPERTY HUNTER_GATE_DONE YES)

View file

@ -146,9 +146,9 @@
"name": "mtxclient", "name": "mtxclient",
"sources": [ "sources": [
{ {
"sha256": "e4899cc4ce87397de2aef865e94ea2cdb8d9cb86253727e7d90532b925ecc770", "sha256": "6334bb71821a0fde54fe24f02ad393cdb6836633557ffdd239b29c5d5108daaf",
"type": "archive", "type": "archive",
"url": "https://github.com/Nheko-Reborn/mtxclient/archive/v0.3.1.tar.gz" "url": "https://github.com/Nheko-Reborn/mtxclient/archive/eddd95a896fad0c51fc800741d82bbc43fc6d41e.tar.gz"
} }
] ]
}, },