fix build on darwin
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Fri, 8 Dec 2023 02:03:44 +0000 (20:03 -0600)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Fri, 8 Dec 2023 02:03:44 +0000 (20:03 -0600)
build.sh

index 6a5f6d39b88a8e4ed85e74969871a36ebb957878..725aa2dcfd7cd6ea20396d0102ef33d459cd84b8 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -77,7 +77,7 @@ compress_all() {
     # Sign the binaries on MacOS
     [ "$(uname)" = 'Darwin' ] && \
         codesign -s - "$DIST_DIR/bin/onyx" && \
-        codesign -s - "$DIST_DIR/lib/onyx_runtime.dylib"
+        [ -f "$DIST_DIR/lib/onyx_runtime.dylib" ] && codesign -s - "$DIST_DIR/lib/onyx_runtime.dylib"
 
     if [ ! -z ${ONYX_RUNTIME_LIBRARY+x} ]; then
         # When including a runtime library, include the lib and include folders
@@ -101,7 +101,7 @@ install_all() {
     # Sign the binaries on MacOS
     [ "$(uname)" = 'Darwin' ] && \
         codesign -s - "$ONYX_INSTALL_DIR/bin/onyx" && \
-        codesign -s - "$ONYX_INSTALL_DIR/lib/onyx_runtime.dylib"
+        [ -f "$DIST_DIR/lib/onyx_runtime.dylib" ] && codesign -s - "$DIST_DIR/lib/onyx_runtime.dylib"
 }
 
 for arg in $@; do