diff --git a/CMakeLists.txt b/CMakeLists.txt index b4aa2352f..5e99e1c41 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -119,7 +119,7 @@ endif() add_subdirectory(lllc) add_subdirectory(solc) add_subdirectory(sc) -if (JSONRPC_LS) +if (JSONRPC_SERVER_LS) add_subdirectory(libweb3jsonrpc) endif() if (NOT LANGUAGES) @@ -150,7 +150,7 @@ if (NOT LANGUAGES) if ("${TARGET_PLATFORM}" STREQUAL "w64") cmake_policy(SET CMP0020 NEW) endif () - if (NOT JSONRPC_LS) + if (NOT JSONRPC_SERVER_LS) message(FATAL_ERROR "Alethzero requires jsonrpc.") endif() diff --git a/cmake/EthDependenciesDeprecated.cmake b/cmake/EthDependenciesDeprecated.cmake index d815bef3e..8c6d07e48 100644 --- a/cmake/EthDependenciesDeprecated.cmake +++ b/cmake/EthDependenciesDeprecated.cmake @@ -125,48 +125,50 @@ else() message(STATUS "Failed to find the miniupnpc headers!") endif () - find_path( JSONRPC_ID jsonrpccpp/server.h - /usr/include - /usr/local/include - ) + find_path( JSONRPC_ID jsonrpccpp/server.h + /usr/include + /usr/local/include + ) if ( JSONRPC_ID ) message(STATUS "Found jsonrpc headers") - find_library( JSONRPC_LS NAMES jsonrpccpp-server + + find_library( JSONCPP_LS NAMES jsoncpp + /usr/lib + /usr/local/lib + /opt/local/lib + /usr/lib/*/ + ) + + find_library( JSONRPC_SERVER_LS NAMES jsonrpccpp-server PATHS /usr/lib /usr/local/lib /opt/local/lib /usr/lib/*/ ) - - find_library( JSONRPC_COMMON_LS NAMES jsonrpccpp-common - PATHS - /usr/lib - /usr/local/lib - /opt/local/lib - /usr/lib/*/ - ) - - find_library( JSONCPP_LS NAMES jsoncpp - /usr/lib - /usr/local/lib - /opt/local/lib - /usr/lib/*/ - ) - - find_library( JSONRPC_CLIENT_LS NAMES jsonrpccpp-client - PATHS - /usr/lib/ - /usr/local/lib - /opt/local/lib - /usr/lib/*/ - ) - - if ( JSONRPC_LS AND JSONRPC_COMMON_LS ) - message(STATUS "Found jsonrpc library: ${JSONRPC_LS}") - message(STATUS "Found jsonrpc-common library: ${JSONRPC_COMMON_LS}") - add_definitions(-DETH_JSONRPC) + + find_library( JSONRPC_COMMON_LS NAMES jsonrpccpp-common + PATHS + /usr/lib + /usr/local/lib + /opt/local/lib + /usr/lib/*/ + ) + + find_library( JSONRPC_CLIENT_LS NAMES jsonrpccpp-client + PATHS + /usr/lib/ + /usr/local/lib + /opt/local/lib + /usr/lib/*/ + ) + + if ( JSONRPC_SERVER_LS AND JSONRPC_COMMON_LS ) + message(STATUS "Found jsonrpc-server library: ${JSONRPC_SERVER_LS}") + message(STATUS "Found jsonrpc-client library: ${JSONRPC_CLIENT_LS}") + message(STATUS "Found jsonrpc-common library: ${JSONRPC_COMMON_LS}") + add_definitions(-DETH_JSONRPC) else () message(STATUS "Failed to find the jsonrpc library!") endif () diff --git a/eth/CMakeLists.txt b/eth/CMakeLists.txt index 7c997b256..1d6325ecc 100644 --- a/eth/CMakeLists.txt +++ b/eth/CMakeLists.txt @@ -17,7 +17,7 @@ if(MINIUPNPC_LS) endif() target_link_libraries(${EXECUTABLE} ${LEVELDB_LS}) target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LS}) -if(JSONRPC_LS) +if(JSONRPC_SERVER_LS) target_link_libraries(${EXECUTABLE} web3jsonrpc) endif() if(READLINE_LS) diff --git a/eth/main.cpp b/eth/main.cpp index 447729c1a..25ebe5cdc 100644 --- a/eth/main.cpp +++ b/eth/main.cpp @@ -28,7 +28,6 @@ #include #include #if ETH_JSONRPC -//#include #include #endif #include diff --git a/libqethereum/CMakeLists.txt b/libqethereum/CMakeLists.txt index ba7cd3b67..709f7f066 100644 --- a/libqethereum/CMakeLists.txt +++ b/libqethereum/CMakeLists.txt @@ -59,7 +59,7 @@ endif() include_directories(/) qt5_use_modules(${EXECUTABLE} Core Gui WebKit WebKitWidgets Widgets Network Quick Qml) -target_link_libraries(${EXECUTABLE} ethereum secp256k1 ${CRYPTOPP_LS} ${JSONRPC_LS}) +target_link_libraries(${EXECUTABLE} ethereum secp256k1 ${CRYPTOPP_LS} ${JSONRPC_SERVER_LS}) if (APPLE) if (${ADDFRAMEWORKS}) diff --git a/libqethereum/QEthereum.h b/libqethereum/QEthereum.h index b4c17fdab..eeb5a493b 100644 --- a/libqethereum/QEthereum.h +++ b/libqethereum/QEthereum.h @@ -26,7 +26,6 @@ #include #include #include -//#include class QWebThree: public QObject { diff --git a/libweb3jsonrpc/CMakeLists.txt b/libweb3jsonrpc/CMakeLists.txt index 6966cd10a..ec8adbffb 100644 --- a/libweb3jsonrpc/CMakeLists.txt +++ b/libweb3jsonrpc/CMakeLists.txt @@ -24,8 +24,8 @@ endif() target_link_libraries(${EXECUTABLE} ${LEVELDB_LS}) target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LS}) target_link_libraries(${EXECUTABLE} ${JSONCPP_LS}) -target_link_libraries(${EXECUTABLE} ${JSONRPC_LS}) target_link_libraries(${EXECUTABLE} ${JSONRPC_COMMON_LS}) +target_link_libraries(${EXECUTABLE} ${JSONRPC_SERVER_LS}) target_link_libraries(${EXECUTABLE} ${LEVELDB_LS}) if(READLINE_LS) target_link_libraries(${EXECUTABLE} ${READLINE_LS}) diff --git a/libweb3jsonrpc/CorsHttpServer.h b/libweb3jsonrpc/CorsHttpServer.h index 5dd3130a4..e697ecaa1 100644 --- a/libweb3jsonrpc/CorsHttpServer.h +++ b/libweb3jsonrpc/CorsHttpServer.h @@ -20,7 +20,6 @@ */ #include -//#include namespace jsonrpc { diff --git a/libweb3jsonrpc/WebThreeStubServer.h b/libweb3jsonrpc/WebThreeStubServer.h index 193f1f6ff..5a1f04d8e 100644 --- a/libweb3jsonrpc/WebThreeStubServer.h +++ b/libweb3jsonrpc/WebThreeStubServer.h @@ -29,7 +29,6 @@ #pragma warning(pop) #include -//#include #include #include #pragma GCC diagnostic push diff --git a/neth/CMakeLists.txt b/neth/CMakeLists.txt index ac275f663..d8b3d8f75 100644 --- a/neth/CMakeLists.txt +++ b/neth/CMakeLists.txt @@ -18,7 +18,7 @@ target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LS}) endif() target_link_libraries(${EXECUTABLE} ${LEVELDB_LS}) target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LS}) -if(JSONRPC_LS) +if(JSONRPC_SERVER_LS) target_link_libraries(${EXECUTABLE} web3jsonrpc) endif() diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 63094fa23..52a73f84a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -16,7 +16,7 @@ target_link_libraries(testeth gmp) target_link_libraries(testeth solidity) target_link_libraries(testeth ${CRYPTOPP_LS}) target_link_libraries(testeth webthree) -if(JSONRPC_LS) +if(JSONRPC_SERVER_LS) target_link_libraries(testeth web3jsonrpc) target_link_libraries(testeth ${JSONRPC_CLIENT_LS}) endif() diff --git a/test/jsonrpc.cpp b/test/jsonrpc.cpp index f261a5164..1eee21357 100644 --- a/test/jsonrpc.cpp +++ b/test/jsonrpc.cpp @@ -31,8 +31,6 @@ #include #include #include -//#include -//#include #include #include "JsonSpiritHeaders.h" #include "TestHelper.h"