Browse Source

Change cmake-files for using internal fork of Hunter package manager (#68)

Change cmake-files for using internal fork of Hunter package manager

Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Co-authored-by: Yura Zarudniy <zarudniy@soramitsu.co.jp>
pull/70/head v0.0.1
Dmitriy Khaustov 5 years ago
committed by GitHub
parent
commit
658312c30d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      CMakeLists.txt
  2. 48
      cmake/Hunter/config.cmake
  3. 8
      cmake/Hunter/init.cmake
  4. 2
      cmake/dependencies.cmake

3
CMakeLists.txt

@ -14,7 +14,8 @@ set(CMAKE_TOOLCHAIN_FILE
)
include("cmake/Hunter/init.cmake")
project(libp2p C CXX)
cmake_policy(SET CMP0048 NEW)
project(libp2p VERSION 0.0.1 LANGUAGES C CXX)
include(cmake/print.cmake)
print("C flags: ${CMAKE_C_FLAGS}")

48
cmake/Hunter/config.cmake

@ -1,42 +1,6 @@
hunter_config(
Boost
VERSION 1.70.0-p0
)
hunter_config(GSL
URL https://github.com/microsoft/GSL/archive/v2.0.0.tar.gz
SHA1 9bbdea551b38d7d09ab7aa2e89b91a66dd032b4a
CMAKE_ARGS GSL_TEST=OFF
)
hunter_config(
GTest
VERSION 1.8.0-hunter-p11
CMAKE_ARGS "CMAKE_CXX_FLAGS=-Wno-deprecated-copy"
)
hunter_config(
spdlog
URL https://github.com/gabime/spdlog/archive/v1.4.2.zip
SHA1 4b10e9aa17f7d568e24f464b48358ab46cb6f39c
)
hunter_config(
tsl_hat_trie
URL https://github.com/masterjedy/hat-trie/archive/343e0dac54fc8491065e8a059a02db9a2b1248ab.zip
SHA1 7b0051e9388d629f382752dd6a12aa8918cdc022
)
hunter_config(
Boost.DI
URL https://github.com/masterjedy/di/archive/c5287ee710ad90f5286d0cc2b9e49b72d89267a6.zip
SHA1 802b64a6242be45771f3d4c86257eac0a3c7b289
# disable building examples and tests, disable testing
CMAKE_ARGS BOOST_DI_OPT_BUILD_TESTS=OFF BOOST_DI_OPT_BUILD_EXAMPLES=OFF
)
hunter_config(
SQLiteModernCpp
URL https://github.com/soramitsu/libp2p-sqlite-modern-cpp/archive/fc3b700064cb57ab6b598c9bc7a12b2842f78da2.zip
SHA1 d913f2a0360892a30bc7cd8820a0475800b47d76
)
## Template for add custom hunter config
#hunter_config(
# package-name
# VERSION 0.0.0-package-version
# CMAKE_ARGS "CMAKE_VARIABLE=value"
#)

8
cmake/Hunter/init.cmake

@ -7,6 +7,9 @@ string(COMPARE EQUAL "$ENV{GITHUB_HUNTER_USERNAME}" "" username_is_empty)
if (NOT password_is_empty AND NOT username_is_empty)
option(HUNTER_RUN_UPLOAD "Upload cache binaries" YES)
message("Binary cache uploading is ENABLED.")
else()
option(HUNTER_RUN_UPLOAD "Upload cache binaries" NO)
message("Binary cache uploading is DISABLED.")
endif ()
set(
@ -25,11 +28,10 @@ set(
"Binary cache server"
)
include(${CMAKE_CURRENT_LIST_DIR}/HunterGate.cmake)
HunterGate(
URL "https://github.com/cpp-pm/hunter/archive/v0.23.216.tar.gz"
SHA1 "a492a1879bee60c29f7af17ef56b45f0d7766241"
URL "https://github.com/soramitsu/soramitsu-hunter/archive/v0.23.253-soramitsu1.tar.gz"
SHA1 2b8e570843e8b6a0c96d70a8d312dda425fa52a9
LOCAL
)

2
cmake/dependencies.cmake

@ -8,7 +8,7 @@ hunter_add_package(Boost COMPONENTS random filesystem program_options)
find_package(Boost CONFIG REQUIRED random filesystem program_options)
# added from hunter_config
hunter_add_package(GSL)
hunter_add_package(Microsoft.GSL)
# https://www.openssl.org/
hunter_add_package(OpenSSL)

Loading…
Cancel
Save