CMakeLists.txt 820 B

12345678910111213141516171819202122232425262728293031
  1. aux_source_directory(. SRC_LIST)
  2. file(GLOB HEADERS "*.h")
  3. eth_simple_add_executable(ethminer ${SRC_LIST} ${HEADERS})
  4. jsonrpcstub_client_create(ethminer minerfarm.json FarmClient ${CMAKE_CURRENT_SOURCE_DIR} FarmClient)
  5. find_package(Eth)
  6. target_include_directories(ethminer PRIVATE ..)
  7. target_link_libraries(ethminer ${Eth_ETHASHSEAL_LIBRARIES} jsonrpc::client)
  8. # TODO: Remove.
  9. target_compile_definitions(ethminer PRIVATE ETH_JSONRPC)
  10. if (MSVC)
  11. find_package(Boost QUIET REQUIRED COMPONENTS chrono date_time)
  12. target_link_libraries(ethminer ${Boost_CHRONO_LIBRARIES})
  13. target_link_libraries(ethminer ${Boost_DATE_TIME_LIBRARIES})
  14. endif()
  15. if (UNIX AND NOT APPLE)
  16. target_link_libraries(ethminer pthread)
  17. endif()
  18. if (APPLE)
  19. install(TARGETS ethminer DESTINATION bin)
  20. else()
  21. eth_install_executable(ethminer)
  22. endif()