UseOpenSSL.cmake 484 B

123456789101112131415
  1. function(eth_apply TARGET REQUIRED)
  2. find_package (OpenSSL)
  3. # cmake supplied FindOpenSSL doesn't set all our variables
  4. set(OPENSSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
  5. eth_show_dependency(OPENSSL OpenSSL)
  6. if (OPENSSL_FOUND)
  7. target_include_directories(${TARGET} SYSTEM PUBLIC ${OPENSSL_INCLUDE_DIRS})
  8. target_link_libraries(${TARGET} ${OPENSSL_LIBRARIES})
  9. elseif (NOT ${REQUIRED} STREQUAL "OPTIONAL")
  10. message(FATAL_ERROR "OpenSSL library not found")
  11. endif()
  12. endfunction()