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)
|
|
|
|
if (NOT OPENSSL_FOUND)
|
2016-12-06 16:51:34 +00:00
|
|
|
# Try to find manually.
|
2017-01-27 20:00:02 +00:00
|
|
|
set (OPENSSL_INCLUDE_DIR "/usr/local/opt/openssl/include")
|
|
|
|
set (OPENSSL_PATHS "/usr/local/opt/openssl/lib")
|
|
|
|
find_library (OPENSSL_SSL_LIBRARY ssl PATHS ${OPENSSL_PATHS})
|
|
|
|
find_library (OPENSSL_CRYPTO_LIBRARY crypto PATHS ${OPENSSL_PATHS})
|
2016-12-06 16:51:34 +00:00
|
|
|
set (OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
|
2016-12-06 13:42:53 +00:00
|
|
|
endif ()
|
2017-01-27 20:00:02 +00:00
|
|
|
|
2017-02-28 23:49:04 +00:00
|
|
|
message (STATUS "Using openssl: ${OPENSSL_INCLUDE_DIR} : ${OPENSSL_LIBRARIES}")
|
2017-01-27 20:00:02 +00:00
|
|
|
include_directories (${OPENSSL_INCLUDE_DIR})
|