sveneh
10 years ago
8 changed files with 60 additions and 33 deletions
@ -1,18 +1,21 @@ |
|||||
if(${APPLE}) |
# CryptoPP does not have good cross-platform support, there exist several different other projects to make it work ... |
||||
ExternalProject_Add(cryptopp |
|
||||
URL https://downloads.sourceforge.net/project/cryptopp/cryptopp/5.6.2/cryptopp562.zip |
if(APPLE) |
||||
BINARY_DIR cryptopp-prefix/src/cryptopp |
ExternalProject_Add(cryptopp |
||||
CONFIGURE_COMMAND "" |
URL https://downloads.sourceforge.net/project/cryptopp/cryptopp/5.6.2/cryptopp562.zip |
||||
BUILD_COMMAND make CXX=clang++ CXXFLAGS=-DCRYPTOPP_DISABLE_ASM |
BINARY_DIR cryptopp-prefix/src/cryptopp |
||||
INSTALL_COMMAND make install PREFIX=${ETH_DEPENDENCY_INSTALL_DIR} |
CONFIGURE_COMMAND "" |
||||
|
BUILD_COMMAND make CXX=clang++ CXXFLAGS=-DCRYPTOPP_DISABLE_ASM |
||||
|
INSTALL_COMMAND make install PREFIX=${ETH_DEPENDENCY_INSTALL_DIR} |
||||
) |
) |
||||
|
# on Linux, the default Makefile does not work. |
||||
else() |
else() |
||||
ExternalProject_Add(cryptopp |
ExternalProject_Add(cryptopp |
||||
URL https://github.com/mmoss/cryptopp/archive/v5.6.2.zip |
URL https://github.com/mmoss/cryptopp/archive/v5.6.2.zip |
||||
BINARY_DIR cryptopp-prefix/src/cryptopp |
BINARY_DIR cryptopp-prefix/src/cryptopp |
||||
CONFIGURE_COMMAND "" |
CONFIGURE_COMMAND "" |
||||
BUILD_COMMAND scons --shared --prefix=${ETH_DEPENDENCY_INSTALL_DIR} |
BUILD_COMMAND scons --shared --prefix=${ETH_DEPENDENCY_INSTALL_DIR} |
||||
INSTALL_COMMAND "" |
INSTALL_COMMAND "" |
||||
) |
) |
||||
endif() |
endif() |
||||
|
|
||||
|
@ -1,11 +1,21 @@ |
|||||
|
# json-rpc-cpp is under heavy development, and multiplatform builds are not yet available. All the platforms currently need patches to make them work. |
||||
|
|
||||
|
if(APPLE) |
||||
|
set(PATCH_CMD patch -d src/example < ${CMAKE_CURRENT_SOURCE_DIR}/json-rpc-cpp_osx.patch) |
||||
|
set(CONFIG_CMD cmake -DCMAKE_INSTALL_PREFIX=${ETH_DEPENDENCY_INSTALL_DIR} -DCMAKE_MODULE_PATH:PATH=${CMAKE_CURRENT_SOURCE_DIR} -DETH_DEPENDENCY_INSTALL_DIR:PATH=${ETH_DEPENDENCY_INSTALL_DIR} -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev .) |
||||
|
else() |
||||
|
set(PATCH_CMD patch --input=${CMAKE_CURRENT_SOURCE_DIR}/json-rpc-cpp_linux.patch --strip=1) |
||||
|
set(CONFIG_CMD cmake -DCMAKE_INSTALL_PREFIX=${ETH_DEPENDENCY_INSTALL_DIR} -DCMAKE_MODULE_PATH:PATH=${CMAKE_CURRENT_SOURCE_DIR} -DETH_DEPENDENCY_INSTALL_DIR:PATH=${ETH_DEPENDENCY_INSTALL_DIR} -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST .) |
||||
|
endif() |
||||
|
|
||||
|
|
||||
ExternalProject_Add(json-rpc-cpp |
ExternalProject_Add(json-rpc-cpp |
||||
DEPENDS curl |
DEPENDS curl |
||||
GIT_REPOSITORY https://github.com/cinemast/libjson-rpc-cpp.git |
GIT_REPOSITORY https://github.com/cinemast/libjson-rpc-cpp.git |
||||
GIT_TAG 0.2.1 |
GIT_TAG 0.2.1 |
||||
BINARY_DIR json-rpc-cpp-prefix/src/json-rpc-cpp |
BINARY_DIR json-rpc-cpp-prefix/src/json-rpc-cpp |
||||
CONFIGURE_COMMAND patch -d src/example < ${CMAKE_CURRENT_SOURCE_DIR}/json-rpc-cpp_osx.patch && cmake -DCMAKE_INSTALL_PREFIX=${ETH_DEPENDENCY_INSTALL_DIR} -DCMAKE_MODULE_PATH:PATH=${CMAKE_CURRENT_SOURCE_DIR} -DETH_DEPENDENCY_INSTALL_DIR:PATH=${ETH_DEPENDENCY_INSTALL_DIR} -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev . |
PATCH_COMMAND ${PATCH_CMD} |
||||
|
CONFIGURE_COMMAND ${CONFIG_CMD} |
||||
BUILD_COMMAND make jsonrpc -j 3 |
BUILD_COMMAND make jsonrpc -j 3 |
||||
INSTALL_COMMAND make install |
INSTALL_COMMAND make install |
||||
) |
) |
||||
|
|
||||
|
|
||||
|
@ -0,0 +1,13 @@ |
|||||
|
diff --git a/src/jsonrpc/CMakeLists.txt b/src/jsonrpc/CMakeLists.txt
|
||||
|
index 79e8515..4e93eef 100644
|
||||
|
--- a/src/jsonrpc/CMakeLists.txt
|
||||
|
+++ b/src/jsonrpc/CMakeLists.txt
|
||||
|
@@ -12,7 +12,7 @@ set(VERSION_STRING ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION})
|
||||
|
set_target_properties(jsonrpc jsonrpcStatic PROPERTIES VERSION "${VERSION_STRING}" SOVERSION "${VERSION_MAJOR}") |
||||
|
|
||||
|
|
||||
|
-target_link_libraries(jsonrpc ${CURL_LIBRARIES})
|
||||
|
+target_link_libraries(jsonrpc ${CURL_LIBRARIES} dl pthread)
|
||||
|
target_link_libraries(jsonrpcStatic ${CURL_LIBRARIES}) |
||||
|
|
||||
|
install(FILES ${jsonrpc_header} DESTINATION include/jsonrpc) |
Loading…
Reference in new issue