Skip to content

Commit

Permalink
Merge pull request #2486
Browse files Browse the repository at this point in the history
8b1acc9 Fix OpenSSL 1.1 detection for static builds (hyc)
  • Loading branch information
fluffypony committed Sep 25, 2017
2 parents 7b8398e + 8b1acc9 commit 031f486
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 031f486

Please sign in to comment.