diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-09-25 20:25:29 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-09-25 20:25:29 +0200 |
commit | 031f486e12188fdd635cdc07f2e05f65881d70ea (patch) | |
tree | 30da70b7fb2180e2f0e35ae1c4a903797b9933ba /CMakeLists.txt | |
parent | Merge pull request #2485 (diff) | |
parent | Fix OpenSSL 1.1 detection for static builds (diff) | |
download | monero-031f486e12188fdd635cdc07f2e05f65881d70ea.tar.xz |
Merge pull request #2486
8b1acc9a Fix OpenSSL 1.1 detection for static builds (hyc)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1be0df305..1f74f59e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -320,6 +320,12 @@ else() message(STATUS "Stack trace on exception disabled") 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) + find_package(Threads) +endif() + # Handle OpenSSL, used for sha256sum on binary updates if (APPLE AND NOT IOS) if (NOT OpenSSL_DIR) @@ -333,16 +339,10 @@ endif() find_package(OpenSSL REQUIRED) if(STATIC AND NOT IOS) if(UNIX) - set(OPENSSL_LIBRARIES "${OPENSSL_LIBRARIES};${CMAKE_DL_LIBS}") + set(OPENSSL_LIBRARIES "${OPENSSL_LIBRARIES};${CMAKE_DL_LIBS};${CMAKE_THREAD_LIBS_INIT}") 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) - find_package(Threads) -endif() - add_definitions(-DAUTO_INITIALIZE_EASYLOGGINGPP) add_subdirectory(external) |