Skip to content

Commit

Permalink
use vcpkg replace hunter
Browse files Browse the repository at this point in the history
  • Loading branch information
cyjseagull committed Aug 19, 2024
1 parent 7c714fe commit da948ca
Show file tree
Hide file tree
Showing 13 changed files with 65 additions and 653 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "vcpkg"]
path = vcpkg
url = https://github.com/microsoft/vcpkg
24 changes: 6 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,41 +22,29 @@ include(FetchContent)

if(NOT DEFINED URL_BASE)
set(URL_BASE "github.com")

# set(URL_BASE "github.com.cnpmjs.org")
endif()

set(BCOS_BOOSTSSL_CMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake" CACHE PATH "The cmake path for the library")
list(APPEND CMAKE_MODULE_PATH ${BCOS_BOOSTSSL_CMAKE_DIR})

# init hunter
include(HunterGate)
HunterGate(
URL "https://${URL_BASE}/FISCO-BCOS/hunter/archive/162ff7cde3d843e43afdab8fe3214275c35ef168.tar.gz"
SHA1 "0ba8099fe89beb0d44986c750fe0d44040725d99"
FILEPATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/config.cmake"
)
# vcpkg init
find_package(Git REQUIRED)
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake" CACHE STRING "Vcpkg toolchain file")

project(bcos-boostssl VERSION "1.0.0")

# basic settings
include(Options)
configure_project()
include(CompilerSettings)

# dependencies environment
include(DepsEnv)

include(BcosUtilitiesDependencies)
# OpenSSL
hunter_add_package(OpenSSL)
find_package(OpenSSL REQUIRED)

# JsonCpp
hunter_add_package(jsoncpp)
find_package(jsoncpp CONFIG REQUIRED)

# bcos-utilities
include(ProjectBcosUtilities)
find_package(jsoncpp REQUIRED)

include_directories(${CMAKE_INSTALL_INCLUDEDIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
Expand Down
3 changes: 3 additions & 0 deletions cmake/BcosUtilitiesDependencies.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
find_package(Boost COMPONENTS log filesystem chrono thread serialization iostreams system)
find_package(ZLIB REQUIRED)
find_package(bcos-utilities REQUIRED)
58 changes: 0 additions & 58 deletions cmake/DepsEnv.cmake

This file was deleted.

Loading

0 comments on commit da948ca

Please sign in to comment.