CMakeLists.txt 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. aux_source_directory(. SRC_LIST)
  2. if(JSONRPC_FOUND)
  3. message("INFO: we found JSONRPC ")
  4. else(JSONRPC_FOUND)
  5. endif(JSONRPC_FOUND)
  6. file(GLOB HEADERS "*.h")
  7. message ("SRC LIST: " ${SRC_LIST})
  8. message ("HEDERS LIST: " ${HEADERS})
  9. add_library(web3jsonrpc ${SRC_LIST} ${HEADERS})
  10. jsonrpcstub_create(web3jsonrpc eth.json
  11. dev::rpc::EthFace ${CMAKE_CURRENT_SOURCE_DIR} EthFace
  12. EthClient ${CMAKE_CURRENT_BINARY_DIR} EthClient
  13. )
  14. jsonrpcstub_create(web3jsonrpc db.json
  15. dev::rpc::DBFace ${CMAKE_CURRENT_SOURCE_DIR} DBFace
  16. DBClient ${CMAKE_CURRENT_BINARY_DIR} DBClient
  17. )
  18. jsonrpcstub_create(web3jsonrpc debug.json
  19. dev::rpc::DebugFace ${CMAKE_CURRENT_SOURCE_DIR} DebugFace
  20. DebugClient ${CMAKE_CURRENT_BINARY_DIR} DebugClient
  21. )
  22. jsonrpcstub_create(web3jsonrpc whisper.json
  23. dev::rpc::WhisperFace ${CMAKE_CURRENT_SOURCE_DIR} WhisperFace
  24. WhisperClient ${CMAKE_CURRENT_BINARY_DIR} WhisperClient
  25. )
  26. jsonrpcstub_create(web3jsonrpc net.json
  27. dev::rpc::NetFace ${CMAKE_CURRENT_SOURCE_DIR} NetFace
  28. NetClient ${CMAKE_CURRENT_BINARY_DIR} NetClient
  29. )
  30. jsonrpcstub_create(web3jsonrpc bzz.json
  31. dev::rpc::BzzFace ${CMAKE_CURRENT_SOURCE_DIR} BzzFace
  32. BzzClient ${CMAKE_CURRENT_BINARY_DIR} BzzClient
  33. )
  34. jsonrpcstub_create(web3jsonrpc web3.json
  35. dev::rpc::Web3Face ${CMAKE_CURRENT_SOURCE_DIR} Web3Face
  36. Web3Client ${CMAKE_CURRENT_BINARY_DIR} Web3Client
  37. )
  38. jsonrpcstub_create(web3jsonrpc admin_net.json
  39. dev::rpc::AdminNetFace ${CMAKE_CURRENT_SOURCE_DIR} AdminNetFace
  40. AdminNetClient ${CMAKE_CURRENT_BINARY_DIR} AdminNetClient
  41. )
  42. jsonrpcstub_create(web3jsonrpc admin_eth.json
  43. dev::rpc::AdminEthFace ${CMAKE_CURRENT_SOURCE_DIR} AdminEthFace
  44. AdminEthClient ${CMAKE_CURRENT_BINARY_DIR} AdminEthClient
  45. )
  46. jsonrpcstub_create(web3jsonrpc admin_utils.json
  47. dev::rpc::AdminUtilsFace ${CMAKE_CURRENT_SOURCE_DIR} AdminUtilsFace
  48. AdminUtilsClient ${CMAKE_CURRENT_BINARY_DIR} AdminUtilsClient
  49. )
  50. jsonrpcstub_create(web3jsonrpc personal.json
  51. dev::rpc::PersonalFace ${CMAKE_CURRENT_SOURCE_DIR} PersonalFace
  52. PersonalClient ${CMAKE_CURRENT_BINARY_DIR} PersonalClient
  53. )
  54. jsonrpcstub_create(web3jsonrpc test.json
  55. dev::rpc::TestFace ${CMAKE_CURRENT_SOURCE_DIR} TestFace
  56. TestClient ${CMAKE_CURRENT_BINARY_DIR} TestClient
  57. )
  58. find_package(Web3)
  59. target_include_directories(web3jsonrpc PRIVATE ..)
  60. target_link_libraries(web3jsonrpc ${Web3_WEBTHREE_LIBRARIES}
  61. ${Web3_WHISPER_LIBRARIES}
  62. jsonrpc::server)
  63. install(TARGETS web3jsonrpc RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)