Merge pull request #214 from ignac/macos_build_issues

Macos build issues
This commit is contained in:
Adrian Lucrèce Céleste 2018-12-30 14:51:09 -05:00 committed by GitHub
commit c38c6bcaa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -311,8 +311,10 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
${OPENSSL_ROOT}/lib/ssleay32.lib ${OPENSSL_ROOT}/lib/ssleay32.lib
) )
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
find_program(BREW_PROGRAM "brew")
if (IS_DIRECTORY /opt/local) find_program(PORT_PROGRAM "ports")
if (IS_DIRECTORY /opt/local AND PORT_PROGRAM)
# macports # macports
set (OPENSSL_ROOT /opt/local) set (OPENSSL_ROOT /opt/local)
@ -321,7 +323,7 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
${OPENSSL_ROOT}/lib/libcrypto.a ${OPENSSL_ROOT}/lib/libcrypto.a
z z
) )
elseif (IS_DIRECTORY /usr/local/opt/openssl) elseif (IS_DIRECTORY /usr/local/opt/openssl AND BREW_PROGRAM)
# brew # brew
set (OPENSSL_ROOT /usr/local/opt/openssl) set (OPENSSL_ROOT /usr/local/opt/openssl)

View File

@ -21,6 +21,8 @@ B_LIBS=$(otool -XL $B_TARGET | awk '{ print $1 }' | grep -Ev '^(/usr/lib|/System
[ $? -ne 0 ] && exit 1 [ $? -ne 0 ] && exit 1
for B_LIB in $B_LIBS; do for B_LIB in $B_LIBS; do
B_LIB_NAME=$(basename $B_LIB) B_LIB_NAME=$(basename $B_LIB)
# otool reports barrier as "barrier:" which fails self-reference test below
B_LIB_NAME=${B_LIB_NAME//:}
# ignore self-references # ignore self-references
[ "$B_TARGET" = "$B_LIB_NAME" ] && continue [ "$B_TARGET" = "$B_LIB_NAME" ] && continue