mirror of https://github.com/debauchee/barrier.git
Fix macos build issues
This commit is contained in:
parent
03f9009d10
commit
730c065ee7
|
@ -311,8 +311,10 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
|||
${OPENSSL_ROOT}/lib/ssleay32.lib
|
||||
)
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
|
||||
if (IS_DIRECTORY /opt/local)
|
||||
find_program(BREW_PROGRAM "brew")
|
||||
find_program(PORT_PROGRAM "ports")
|
||||
|
||||
if (IS_DIRECTORY /opt/local AND PORT_PROGRAM)
|
||||
# macports
|
||||
set (OPENSSL_ROOT /opt/local)
|
||||
|
||||
|
@ -321,7 +323,7 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|||
${OPENSSL_ROOT}/lib/libcrypto.a
|
||||
z
|
||||
)
|
||||
elseif (IS_DIRECTORY /usr/local/opt/openssl)
|
||||
elseif (IS_DIRECTORY /usr/local/opt/openssl AND BREW_PROGRAM)
|
||||
# brew
|
||||
set (OPENSSL_ROOT /usr/local/opt/openssl)
|
||||
|
||||
|
|
|
@ -21,6 +21,8 @@ B_LIBS=$(otool -XL $B_TARGET | awk '{ print $1 }' | grep -Ev '^(/usr/lib|/System
|
|||
[ $? -ne 0 ] && exit 1
|
||||
for B_LIB in $B_LIBS; do
|
||||
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
|
||||
[ "$B_TARGET" = "$B_LIB_NAME" ] && continue
|
||||
|
|
Loading…
Reference in New Issue