2016-12-06 13:42:53 +00:00
|
|
|
set (OPENSSL_USE_STATIC_LIBS ${USE_STATIC_LIBRARIES})
|
|
|
|
if (APPLE)
|
|
|
|
set (OPENSSL_ROOT_DIR "/usr/local/opt/openssl")
|
|
|
|
endif ()
|
|
|
|
find_package (OpenSSL)
|
2016-12-06 16:51:34 +00:00
|
|
|
if (OPENSSL_FOUND)
|
|
|
|
include_directories (${OPENSSL_INCLUDE_DIR})
|
|
|
|
endif ()
|
2016-12-06 13:42:53 +00:00
|
|
|
if (NOT OPENSSL_FOUND)
|
2016-12-06 16:51:34 +00:00
|
|
|
# Try to find manually.
|
|
|
|
include_directories ("/usr/local/opt/openssl/include")
|
|
|
|
set (OPENSSL_HINTS "/usr/local/opt/openssl/lib")
|
|
|
|
if (USE_STATIC_LIBRARIES)
|
|
|
|
find_library (OPENSSL_SSL_LIBRARY libssl.a HINTS ${OPENSSL_HINTS})
|
|
|
|
find_library (OPENSSL_CRYPTO_LIBRARY libcrypto.a HINTS ${OPENSSL_HINTS})
|
|
|
|
else ()
|
|
|
|
find_library (OPENSSL_SSL_LIBRARY ssl HINTS ${OPENSSL_HINTS})
|
|
|
|
find_library (OPENSSL_CRYPTO_LIBRARY crypto HINTS ${OPENSSL_HINTS})
|
|
|
|
endif ()
|
|
|
|
set (OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
|
2016-12-06 13:42:53 +00:00
|
|
|
endif ()
|