FindOpenSSL.cmake 669 B

123456789101112131415161718192021
  1. # Extension of the standard FindOpenSSL.cmake
  2. # Adds OPENSSL_INCLUDE_DIRS and libeay32
  3. include("${CMAKE_ROOT}/Modules/FindOpenSSL.cmake")
  4. # starting 2.8 it is better to use standard modules
  5. if(CMAKE_MAJOR_VERSION EQUAL "2" AND CMAKE_MINOR_VERSION LESS "8")
  6. # Bill Hoffman told that libeay32 is necessary for him:
  7. find_library(SSL_LIBEAY NAMES libeay32)
  8. if(OPENSSL_FOUND)
  9. if(SSL_LIBEAY)
  10. list(APPEND OPENSSL_LIBRARIES ${SSL_LIBEAY})
  11. else()
  12. set(OPENSSL_FOUND FALSE)
  13. endif()
  14. endif()
  15. endif() # if (CMAKE_MAJOR_VERSION EQUAL "2" AND CMAKE_MINOR_VERSION LESS "8")
  16. if(OPENSSL_FOUND)
  17. set(OPENSSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
  18. endif()