diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-02-21 17:11:12 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-02-21 17:11:12 +0200 |
commit | 058eed369ba328dce34e9c1593a9ddbfaceea2af (patch) | |
tree | a803fd203f2e99406f6c03aefd0da2030bce3cec /CMakeLists.txt | |
parent | Merge pull request #1754 (diff) | |
download | monero-058eed369ba328dce34e9c1593a9ddbfaceea2af.tar.xz |
cmakify openssl
Diffstat (limited to '')
-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) |