Update dependencies

master
Nicolas Werner 4 years ago
parent 21a1f249f9
commit d72eb5eb2d
  1. 1
      .ci/script.sh
  2. 11
      CMakeLists.txt
  3. 2
      cmake/Hunter/config.cmake
  4. 77
      cmake/HunterGate.cmake
  5. 4
      io.github.NhekoReborn.Nheko.json

@ -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

@ -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()

@ -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
) )

@ -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}")
# Check Hunter already downloaded by HunterGate set(HUNTER_GATE_VERSION "${_unused}")
if(NOT EXISTS "${_done_location}") else()
hunter_gate_download("${_archive_id_location}") get_filename_component(_archive_id_location "${_hunter_self}/.." ABSOLUTE)
endif() set(_done_location "${_archive_id_location}/DONE")
set(_sha1_location "${_archive_id_location}/SHA1")
# Check Hunter already downloaded by HunterGate
if(NOT EXISTS "${_done_location}")
hunter_gate_download("${_archive_id_location}")
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)

@ -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"
} }
] ]
}, },

Loading…
Cancel
Save