From 81e05756d490efee86f66146df28ce434c36175f Mon Sep 17 00:00:00 2001 From: Gilad S Date: Sun, 30 Jun 2024 23:57:20 +0300 Subject: [PATCH] fix: macOS prebuilt binaries (#259) * fix: macOS prebuilt binaries * fix: add snap assert file to releases --- .github/workflows/build.yml | 2 +- llama/CMakeLists.txt | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0efa778f..7b165472 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -566,7 +566,7 @@ jobs: run: | shopt -s nullglob - for file in ./electron-app-example/release/*.{dmg,zip,exe,appx,AppImage,snap,deb,tar.gz}; do + for file in ./electron-app-example/release/*.{dmg,zip,exe,appx,AppImage,snap,assert,deb,tar.gz}; do echo "Adding $file to release $RELEASE_TAG" gh release upload "v$RELEASE_TAG" "$file" done diff --git a/llama/CMakeLists.txt b/llama/CMakeLists.txt index 43b99ef4..5f4a8888 100644 --- a/llama/CMakeLists.txt +++ b/llama/CMakeLists.txt @@ -131,7 +131,15 @@ endif() file(GLOB SOURCE_FILES "addon.cpp" ${GPU_INFO_SOURCES}) -set(CMAKE_BUILD_RPATH_USE_ORIGIN ON) +if(APPLE) + set(CMAKE_SKIP_BUILD_RPATH FALSE) + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set(CMAKE_BUILD_RPATH "@loader_path") + set(CMAKE_INSTALL_RPATH "@loader_path") + set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) +else() + set(CMAKE_BUILD_RPATH_USE_ORIGIN ON) +endif() add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES} ${CMAKE_JS_SRC} ${GPU_INFO_HEADERS}) set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")