mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-20 18:45:55 +00:00
Improve openssl directory finding
This commit is contained in:
@@ -294,10 +294,13 @@ macro(find_pthread)
|
||||
endmacro()
|
||||
|
||||
macro(find_openssl openssl_min)
|
||||
if (APPLE)
|
||||
# swd TBD fixme
|
||||
file(GLOB OPENSSL_ROOT_DIR /usr/local/Cellar/openssl/*)
|
||||
# set(OPENSSL_ROOT_DIR /usr/local/Cellar/openssl)
|
||||
if (APPLE AND NOT DEFINED ENV{OPENSSL_ROOT_DIR})
|
||||
find_program(HOMEBREW brew)
|
||||
if (NOT HOMEBREW STREQUAL "HOMEBREW-NOTFOUND")
|
||||
execute_process(COMMAND brew --prefix openssl
|
||||
OUTPUT_VARIABLE OPENSSL_ROOT_DIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
|
||||
@@ -385,11 +385,13 @@ def config_base(env):
|
||||
except KeyError:
|
||||
pass
|
||||
elif Beast.system.osx:
|
||||
OSX_OPENSSL_ROOT = '/usr/local/Cellar/openssl/'
|
||||
most_recent = sorted(os.listdir(OSX_OPENSSL_ROOT))[-1]
|
||||
openssl = os.path.join(OSX_OPENSSL_ROOT, most_recent)
|
||||
try:
|
||||
openssl = subprocess.check_output(['brew', '--prefix','openssl'],
|
||||
stderr=subprocess.STDOUT).strip()
|
||||
env.Prepend(CPPPATH='%s/include' % openssl)
|
||||
env.Prepend(LIBPATH=['%s/lib' % openssl])
|
||||
except:
|
||||
pass
|
||||
if not 'vcxproj' in COMMAND_LINE_TARGETS:
|
||||
env.Append(CPPDEFINES=['NO_LOG_UNHANDLED_EXCEPTIONS'])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user