We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
2 parentseedd031 +acb020b commit6a7e92cCopy full SHA for 6a7e92c
CMakeLists.txt
@@ -49,7 +49,23 @@ set(Boost_USE_MULTI_THREADED ON)
49
find_package(Boost 1.58.0 REQUIRED COMPONENTSsystem thread)
50
51
if (CPP-NETLIB_ENABLE_HTTPS)
52
- find_package( OpenSSL )
+ if (APPLE)
53
+# If we're on OS X check for Homebrew's copy of OpenSSL instead of Apple's
54
+ if (NOT OpenSSL_DIR)
55
+ find_program(HOMEBREW brew)
56
+ if (HOMEBREWSTREQUAL"HOMEBREW-NOTFOUND")
57
+ message(WARNING"Homebrew not found: not using Homebrew's OpenSSL")
58
+ if (NOT OPENSSL_ROOT_DIR)
59
+ message(WARNING"Use -DOPENSSL_ROOT_DIR for non-Apple OpenSSL")
60
+ endif()
61
+ else()
62
+ execute_process(COMMAND brew --prefix openssl
63
+OUTPUT_VARIABLE OPENSSL_ROOT_DIR
64
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
65
66
67
68
+ find_package(OpenSSL)
69
endif()
70
71
find_package( Threads )