diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-02-21 17:23:10 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-02-21 17:23:10 +0200 |
commit | 2bdad8d69575ae4fc6ac465d141929f57f05a6c2 (patch) | |
tree | 76aa78789bb66d7c40eab0282f171fbd56220022 /CMakeLists.txt | |
parent | Merge pull request #1759 (diff) | |
parent | add openssl to readme (diff) | |
download | monero-2bdad8d69575ae4fc6ac465d141929f57f05a6c2.tar.xz |
Merge pull request #1760
efdd783c add openssl to readme (Riccardo Spagni)
058eed36 cmakify openssl (Riccardo Spagni)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c01be24d4..69715738e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -311,6 +311,23 @@ else() message(STATUS "Stack trace on exception disabled") endif() +# Handle OpenSSL, used for sha256sum on binary updates +if (APPLE) + if (NOT OpenSSL_DIR) + EXECUTE_PROCESS(COMMAND brew --prefix openssl + OUTPUT_VARIABLE OPENSSL_ROOT_DIR + OUTPUT_STRIP_TRAILING_WHITESPACE) + message(STATUS "Using OpenSSL found at ${OPENSSL_ROOT_DIR}") + endif() +endif() + +find_package(OpenSSL REQUIRED) +if(STATIC) + if(UNIX) + set(OPENSSL_LIBRARIES "${OPENSSL_LIBRARIES};${CMAKE_DL_LIBS}") + endif() +endif() + if (UNIX AND NOT APPLE) # Note that at the time of this writing the -Wstrict-prototypes flag added below will make this fail set(THREADS_PREFER_PTHREAD_FLAG ON) |