Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic vcpkg. #12859

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Basic vcpkg integration.
aarlt committed Mar 25, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit c296f1664f3912e3e8173f937fc3f0e3c92a1b2c
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/aarlt/vcpkg.git
23 changes: 19 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
cmake_minimum_required(VERSION 3.13.0)

#set(vcpkg "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake")
#if (NOT CMAKE_TOOLCHAIN_FILE)
# if (EXISTS "${vcpkg}")
# set(CMAKE_TOOLCHAIN_FILE "${vcpkg}"
# CACHE FILEPATH "CMake toolchain file")
# else()
# set(CMAKE_TOOLCHAIN_FILE "${CMAKE_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake"
# CACHE FILEPATH "CMake toolchain file")
# endif()
# message(STATUS "vcpkg toolchain found: ${CMAKE_TOOLCHAIN_FILE}")
#endif ()

set(CMAKE_TOOLCHAIN_FILE "${CMAKE_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake"
CACHE FILEPATH "CMake toolchain file")
message(STATUS "vcpkg toolchain found: ${CMAKE_TOOLCHAIN_FILE}")

set(ETH_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}/cmake" CACHE PATH "The the path to the cmake directory")
list(APPEND CMAKE_MODULE_PATH ${ETH_CMAKE_DIR})

@@ -41,10 +57,9 @@ include(EthCcache)

# Let's find our dependencies
include(EthDependencies)
include(fmtlib)
include(jsoncpp)
include(range-v3)
include_directories(SYSTEM ${JSONCPP_INCLUDE_DIR})
find_package(fmt CONFIG REQUIRED)
find_package(jsoncpp CONFIG REQUIRED)
find_package(range-v3 CONFIG REQUIRED)

find_package(Threads)

8 changes: 0 additions & 8 deletions cmake/FindCLN.cmake

This file was deleted.

33 changes: 0 additions & 33 deletions cmake/FindCVC4.cmake

This file was deleted.

8 changes: 0 additions & 8 deletions cmake/FindGMP.cmake

This file was deleted.

51 changes: 0 additions & 51 deletions cmake/FindZ3.cmake

This file was deleted.

20 changes: 0 additions & 20 deletions cmake/fmtlib.cmake

This file was deleted.

70 changes: 0 additions & 70 deletions cmake/jsoncpp.cmake

This file was deleted.

38 changes: 0 additions & 38 deletions cmake/range-v3.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion libsolutil/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ set(sources
)

add_library(solutil ${sources})
target_link_libraries(solutil PUBLIC jsoncpp Boost::boost Boost::filesystem Boost::system range-v3)
target_link_libraries(solutil PRIVATE Boost::boost Boost::filesystem Boost::system range-v3 jsoncpp_static)
target_include_directories(solutil PUBLIC "${CMAKE_SOURCE_DIR}")
add_dependencies(solutil solidity_BuildInfo.h)

4 changes: 2 additions & 2 deletions libsolutil/JSON.cpp
Original file line number Diff line number Diff line change
@@ -33,8 +33,8 @@
using namespace std;

static_assert(
(JSONCPP_VERSION_MAJOR == 1) && (JSONCPP_VERSION_MINOR == 9) && (JSONCPP_VERSION_PATCH == 3),
"Unexpected jsoncpp version: " JSONCPP_VERSION_STRING ". Expecting 1.9.3."
(JSONCPP_VERSION_MAJOR == 1) && (JSONCPP_VERSION_MINOR == 9) && (JSONCPP_VERSION_PATCH == 5),
"Unexpected jsoncpp version: " JSONCPP_VERSION_STRING ". Expecting 1.9.5."
);

namespace solidity::util
1 change: 1 addition & 0 deletions vcpkg
Submodule vcpkg added at c1dc3a
19 changes: 19 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
"name": "solidity",
"version": "0.8.13",
"dependencies": [
"boost-system",
"boost-filesystem",
"boost-test",
"boost-program-options",
"boost-multiprecision",
"boost-bimap",
"boost-assign",
"boost-process",
"range-v3",
"fmt",
"jsoncpp",
"z3"
]
}