From 03571c706acf8e148e56442814d2217ea5a140b1 Mon Sep 17 00:00:00 2001 From: Hans Date: Fri, 3 May 2024 15:55:40 +0800 Subject: [PATCH] fix: fix missing file for Metal --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a308b4..e7a2418 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -168,3 +168,11 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ ${PLATFORM_BINARY_DIR}/$ COMMENT "Copying to bin folder" ) + +# copy ggml-metal.metal +if (PLATFORM STREQUAL "darwin") + add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_INSTALL_BINDIR}/ggml-metal.metal ${PLATFORM_BINARY_DIR}/ggml-metal.metal + COMMENT "Copying ggml-metal.metal to bin folder" + ) +endif()