Browse Source

little cleanup after upgrading jsonrpc

cl-refactor
Marek Kotewicz 10 years ago
parent
commit
23c39172f8
  1. 4
      CMakeLists.txt
  2. 68
      cmake/EthDependenciesDeprecated.cmake
  3. 2
      eth/CMakeLists.txt
  4. 1
      eth/main.cpp
  5. 2
      libqethereum/CMakeLists.txt
  6. 1
      libqethereum/QEthereum.h
  7. 2
      libweb3jsonrpc/CMakeLists.txt
  8. 1
      libweb3jsonrpc/CorsHttpServer.h
  9. 1
      libweb3jsonrpc/WebThreeStubServer.h
  10. 2
      neth/CMakeLists.txt
  11. 2
      test/CMakeLists.txt
  12. 2
      test/jsonrpc.cpp

4
CMakeLists.txt

@ -119,7 +119,7 @@ endif()
add_subdirectory(lllc) add_subdirectory(lllc)
add_subdirectory(solc) add_subdirectory(solc)
add_subdirectory(sc) add_subdirectory(sc)
if (JSONRPC_LS) if (JSONRPC_SERVER_LS)
add_subdirectory(libweb3jsonrpc) add_subdirectory(libweb3jsonrpc)
endif() endif()
if (NOT LANGUAGES) if (NOT LANGUAGES)
@ -150,7 +150,7 @@ if (NOT LANGUAGES)
if ("${TARGET_PLATFORM}" STREQUAL "w64") if ("${TARGET_PLATFORM}" STREQUAL "w64")
cmake_policy(SET CMP0020 NEW) cmake_policy(SET CMP0020 NEW)
endif () endif ()
if (NOT JSONRPC_LS) if (NOT JSONRPC_SERVER_LS)
message(FATAL_ERROR "Alethzero requires jsonrpc.") message(FATAL_ERROR "Alethzero requires jsonrpc.")
endif() endif()

68
cmake/EthDependenciesDeprecated.cmake

@ -125,48 +125,50 @@ else()
message(STATUS "Failed to find the miniupnpc headers!") message(STATUS "Failed to find the miniupnpc headers!")
endif () endif ()
find_path( JSONRPC_ID jsonrpccpp/server.h find_path( JSONRPC_ID jsonrpccpp/server.h
/usr/include /usr/include
/usr/local/include /usr/local/include
) )
if ( JSONRPC_ID ) if ( JSONRPC_ID )
message(STATUS "Found jsonrpc headers") 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 PATHS
/usr/lib /usr/lib
/usr/local/lib /usr/local/lib
/opt/local/lib /opt/local/lib
/usr/lib/*/ /usr/lib/*/
) )
find_library( JSONRPC_COMMON_LS NAMES jsonrpccpp-common find_library( JSONRPC_COMMON_LS NAMES jsonrpccpp-common
PATHS PATHS
/usr/lib /usr/lib
/usr/local/lib /usr/local/lib
/opt/local/lib /opt/local/lib
/usr/lib/*/ /usr/lib/*/
) )
find_library( JSONCPP_LS NAMES jsoncpp find_library( JSONRPC_CLIENT_LS NAMES jsonrpccpp-client
/usr/lib PATHS
/usr/local/lib /usr/lib/
/opt/local/lib /usr/local/lib
/usr/lib/*/ /opt/local/lib
) /usr/lib/*/
)
find_library( JSONRPC_CLIENT_LS NAMES jsonrpccpp-client
PATHS if ( JSONRPC_SERVER_LS AND JSONRPC_COMMON_LS )
/usr/lib/ message(STATUS "Found jsonrpc-server library: ${JSONRPC_SERVER_LS}")
/usr/local/lib message(STATUS "Found jsonrpc-client library: ${JSONRPC_CLIENT_LS}")
/opt/local/lib message(STATUS "Found jsonrpc-common library: ${JSONRPC_COMMON_LS}")
/usr/lib/*/ add_definitions(-DETH_JSONRPC)
)
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)
else () else ()
message(STATUS "Failed to find the jsonrpc library!") message(STATUS "Failed to find the jsonrpc library!")
endif () endif ()

2
eth/CMakeLists.txt

@ -17,7 +17,7 @@ if(MINIUPNPC_LS)
endif() endif()
target_link_libraries(${EXECUTABLE} ${LEVELDB_LS}) target_link_libraries(${EXECUTABLE} ${LEVELDB_LS})
target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LS}) target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LS})
if(JSONRPC_LS) if(JSONRPC_SERVER_LS)
target_link_libraries(${EXECUTABLE} web3jsonrpc) target_link_libraries(${EXECUTABLE} web3jsonrpc)
endif() endif()
if(READLINE_LS) if(READLINE_LS)

1
eth/main.cpp

@ -28,7 +28,6 @@
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/trim_all.hpp> #include <boost/algorithm/string/trim_all.hpp>
#if ETH_JSONRPC #if ETH_JSONRPC
//#include <jsonrpc/connectors/httpserver.h>
#include <libweb3jsonrpc/CorsHttpServer.h> #include <libweb3jsonrpc/CorsHttpServer.h>
#endif #endif
#include <libdevcrypto/FileSystem.h> #include <libdevcrypto/FileSystem.h>

2
libqethereum/CMakeLists.txt

@ -59,7 +59,7 @@ endif()
include_directories(/) include_directories(/)
qt5_use_modules(${EXECUTABLE} Core Gui WebKit WebKitWidgets Widgets Network Quick Qml) 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 (APPLE)
if (${ADDFRAMEWORKS}) if (${ADDFRAMEWORKS})

1
libqethereum/QEthereum.h

@ -26,7 +26,6 @@
#include <QtCore/QObject> #include <QtCore/QObject>
#include <QtCore/QString> #include <QtCore/QString>
#include <jsonrpccpp/server.h> #include <jsonrpccpp/server.h>
//#include <jsonrpc/rpc.h>
class QWebThree: public QObject class QWebThree: public QObject
{ {

2
libweb3jsonrpc/CMakeLists.txt

@ -24,8 +24,8 @@ endif()
target_link_libraries(${EXECUTABLE} ${LEVELDB_LS}) target_link_libraries(${EXECUTABLE} ${LEVELDB_LS})
target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LS}) target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LS})
target_link_libraries(${EXECUTABLE} ${JSONCPP_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_COMMON_LS})
target_link_libraries(${EXECUTABLE} ${JSONRPC_SERVER_LS})
target_link_libraries(${EXECUTABLE} ${LEVELDB_LS}) target_link_libraries(${EXECUTABLE} ${LEVELDB_LS})
if(READLINE_LS) if(READLINE_LS)
target_link_libraries(${EXECUTABLE} ${READLINE_LS}) target_link_libraries(${EXECUTABLE} ${READLINE_LS})

1
libweb3jsonrpc/CorsHttpServer.h

@ -20,7 +20,6 @@
*/ */
#include <jsonrpccpp/server/connectors/httpserver.h> #include <jsonrpccpp/server/connectors/httpserver.h>
//#include <jsonrpc/connectors/httpserver.h>
namespace jsonrpc namespace jsonrpc
{ {

1
libweb3jsonrpc/WebThreeStubServer.h

@ -29,7 +29,6 @@
#pragma warning(pop) #pragma warning(pop)
#include <iostream> #include <iostream>
//#include <jsonrpc/rpc.h>
#include <jsonrpccpp/server.h> #include <jsonrpccpp/server.h>
#include <libdevcrypto/Common.h> #include <libdevcrypto/Common.h>
#pragma GCC diagnostic push #pragma GCC diagnostic push

2
neth/CMakeLists.txt

@ -18,7 +18,7 @@ target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LS})
endif() endif()
target_link_libraries(${EXECUTABLE} ${LEVELDB_LS}) target_link_libraries(${EXECUTABLE} ${LEVELDB_LS})
target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LS}) target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LS})
if(JSONRPC_LS) if(JSONRPC_SERVER_LS)
target_link_libraries(${EXECUTABLE} web3jsonrpc) target_link_libraries(${EXECUTABLE} web3jsonrpc)
endif() endif()

2
test/CMakeLists.txt

@ -16,7 +16,7 @@ target_link_libraries(testeth gmp)
target_link_libraries(testeth solidity) target_link_libraries(testeth solidity)
target_link_libraries(testeth ${CRYPTOPP_LS}) target_link_libraries(testeth ${CRYPTOPP_LS})
target_link_libraries(testeth webthree) target_link_libraries(testeth webthree)
if(JSONRPC_LS) if(JSONRPC_SERVER_LS)
target_link_libraries(testeth web3jsonrpc) target_link_libraries(testeth web3jsonrpc)
target_link_libraries(testeth ${JSONRPC_CLIENT_LS}) target_link_libraries(testeth ${JSONRPC_CLIENT_LS})
endif() endif()

2
test/jsonrpc.cpp

@ -31,8 +31,6 @@
#include <libweb3jsonrpc/CorsHttpServer.h> #include <libweb3jsonrpc/CorsHttpServer.h>
#include <jsonrpccpp/server/connectors/httpserver.h> #include <jsonrpccpp/server/connectors/httpserver.h>
#include <jsonrpccpp/client/connectors/httpclient.h> #include <jsonrpccpp/client/connectors/httpclient.h>
//#include <jsonrpc/connectors/httpserver.h>
//#include <jsonrpc/connectors/httpclient.h>
#include <set> #include <set>
#include "JsonSpiritHeaders.h" #include "JsonSpiritHeaders.h"
#include "TestHelper.h" #include "TestHelper.h"

Loading…
Cancel
Save