Browse Source

Use jsoncpp from hunter

cl-refactor
Paweł Bylica 8 years ago
parent
commit
98fa4e469e
No known key found for this signature in database GPG Key ID: 7A0C037434FE77EF
  1. 3
      CMakeLists.txt
  2. 12
      cmake/EthDependencies.cmake
  3. 7
      libstratum/CMakeLists.txt

3
CMakeLists.txt

@ -141,6 +141,9 @@ endif ()
hunter_add_package(Boost COMPONENTS system)
find_package(Boost CONFIG REQUIRED COMPONENTS system)
hunter_add_package(jsoncpp)
find_package(jsoncpp CONFIG REQUIRED)
include(EthDependencies)
configureProject()

12
cmake/EthDependencies.cmake

@ -22,13 +22,6 @@ set(ETH_SCRIPTS_DIR ${CMAKE_CURRENT_LIST_DIR}/scripts)
find_program(CTEST_COMMAND ctest)
message(STATUS "ctest path: ${CTEST_COMMAND}")
# Dependencies must have a version number, to ensure reproducible build. The version provided here is the one that is in the extdep repository. If you use system libraries, version numbers may be different.
# TODO the Jsoncpp package does not yet check for correct version number
find_package (Jsoncpp 0.60 REQUIRED)
message(" - Jsoncpp header: ${JSONCPP_INCLUDE_DIRS}")
message(" - Jsoncpp lib : ${JSONCPP_LIBRARIES}")
find_package (json_rpc_cpp 0.4 REQUIRED)
message (" - json-rpc-cpp header: ${JSON_RPC_CPP_INCLUDE_DIRS}")
message (" - json-rpc-cpp lib : ${JSON_RPC_CPP_LIBRARIES}")
@ -42,8 +35,3 @@ endif()
# find location of jsonrpcstub
find_program(ETH_JSON_RPC_STUB jsonrpcstub)
message(" - jsonrpcstub location : ${ETH_JSON_RPC_STUB}")
if (APPLE)
link_directories(/usr/local/lib)
include_directories(/usr/local/include)
endif()

7
libstratum/CMakeLists.txt

@ -1,11 +1,8 @@
include_directories(..)
include_directories(${JSONCPP_INCLUDE_DIRS})
set(SOURCES
EthStratumClient.h EthStratumClient.cpp
EthStratumClientV2.h EthStratumClientV2.cpp
)
add_library(ethstratum ${SOURCES})
target_link_libraries(ethstratum PUBLIC Boost::system)
target_include_directories(ethstratum PUBLIC SYSTEM ${JSONCPP_INCLUDE_DIRS})
target_link_libraries(ethstratum PUBLIC Boost::system jsoncpp_lib_static)
target_include_directories(ethstratum PRIVATE ..)

Loading…
Cancel
Save