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()
|
endmacro()
|
||||||
|
|
||||||
macro(find_openssl openssl_min)
|
macro(find_openssl openssl_min)
|
||||||
if (APPLE)
|
if (APPLE AND NOT DEFINED ENV{OPENSSL_ROOT_DIR})
|
||||||
# swd TBD fixme
|
find_program(HOMEBREW brew)
|
||||||
file(GLOB OPENSSL_ROOT_DIR /usr/local/Cellar/openssl/*)
|
if (NOT HOMEBREW STREQUAL "HOMEBREW-NOTFOUND")
|
||||||
# set(OPENSSL_ROOT_DIR /usr/local/Cellar/openssl)
|
execute_process(COMMAND brew --prefix openssl
|
||||||
|
OUTPUT_VARIABLE OPENSSL_ROOT_DIR
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
|
|||||||
@@ -385,11 +385,13 @@ def config_base(env):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
elif Beast.system.osx:
|
elif Beast.system.osx:
|
||||||
OSX_OPENSSL_ROOT = '/usr/local/Cellar/openssl/'
|
try:
|
||||||
most_recent = sorted(os.listdir(OSX_OPENSSL_ROOT))[-1]
|
openssl = subprocess.check_output(['brew', '--prefix','openssl'],
|
||||||
openssl = os.path.join(OSX_OPENSSL_ROOT, most_recent)
|
stderr=subprocess.STDOUT).strip()
|
||||||
env.Prepend(CPPPATH='%s/include' % openssl)
|
env.Prepend(CPPPATH='%s/include' % openssl)
|
||||||
env.Prepend(LIBPATH=['%s/lib' % openssl])
|
env.Prepend(LIBPATH=['%s/lib' % openssl])
|
||||||
|
except:
|
||||||
|
pass
|
||||||
if not 'vcxproj' in COMMAND_LINE_TARGETS:
|
if not 'vcxproj' in COMMAND_LINE_TARGETS:
|
||||||
env.Append(CPPDEFINES=['NO_LOG_UNHANDLED_EXCEPTIONS'])
|
env.Append(CPPDEFINES=['NO_LOG_UNHANDLED_EXCEPTIONS'])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user