CMakeLists.txt 763 B

123456789101112131415161718192021222324
  1. aux_source_directory(. SRC_LIST)
  2. file(GLOB HEADERS "*.h")
  3. add_library(ethashseal ${SRC_LIST} ${HEADERS})
  4. eth_use(ethashseal OPTIONAL Eth::ethash-cl Cpuid)
  5. find_package(Eth)
  6. target_include_directories(ethashseal PRIVATE ..)
  7. target_link_libraries(ethashseal ${Eth_ETHASH_LIBRARIES})
  8. target_link_libraries(ethashseal ${Eth_ETHEREUM_LIBRARIES})
  9. if (ETHASHCL)
  10. eth_use(ethashseal REQUIRED OpenCL)
  11. if (OpenCL_FOUND)
  12. target_include_directories(ethashseal SYSTEM PUBLIC ${OpenCL_INCLUDE_DIRS})
  13. target_link_libraries(ethashseal ${Eth_ETHASH-CL_LIBRARIES})
  14. target_compile_definitions(ethashseal PUBLIC ETH_ETHASHCL)
  15. endif()
  16. endif()
  17. install(TARGETS ethashseal RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)