Skip to content

Commit 9022d9e

Browse files
committed
Fix for Codeplex Issue #246
1 parent cab4cf6 commit 9022d9e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Release/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,14 @@ elseif(ANDROID)
5959
elseif(UNIX) # This includes OSX
6060
find_package(Boost REQUIRED COMPONENTS random chrono system thread locale regex filesystem)
6161
find_package(Threads REQUIRED)
62-
find_package(OpenSSL REQUIRED)
62+
if(APPLE AND NOT OPENSSL_ROOT_DIR)
63+
# Prefer a homebrew version of OpenSSL over the one in /usr/lib
64+
file(GLOB OPENSSL_ROOT_DIR /usr/local/Cellar/openssl/*)
65+
# Prefer the latest (make the latest one first)
66+
list(REVERSE OPENSSL_ROOT_DIR)
67+
endif()
68+
# This should prevent linking against the system provided 0.9.8y
69+
find_package(OpenSSL 1.0.0 REQUIRED)
6370

6471
option(BUILD_SHARED_LIBS "Build shared Libraries." ON)
6572
option(BUILD_TESTS "Build tests." ON)

0 commit comments

Comments
 (0)