From bdeec7fbe07ac54055898f475da9057edad5a125 Mon Sep 17 00:00:00 2001 From: Roy Shilkrot Date: Mon, 29 Jul 2024 23:10:01 -0400 Subject: [PATCH 1/2] Update CMakeLists.txt to include Metal shader library installation for macOS release --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ba614f..5a2ee0e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -152,6 +152,7 @@ else() endif(WIN32) ExternalProject_Get_Property(Whispercpp_Build INSTALL_DIR) +ExternalProject_Get_Property(Whispercpp_Build BINARY_DIR) # add the Whisper library to the link line if(WIN32) @@ -206,4 +207,13 @@ else() install(DIRECTORY ${INSTALL_DIR}/lib DESTINATION ${CMAKE_SOURCE_DIR}/release) install(DIRECTORY ${INSTALL_DIR}/include DESTINATION ${CMAKE_SOURCE_DIR}/release) + if(APPLE) + # copy the Metal shader library to the release directory + install(DIRECTORY ${INSTALL_DIR}/lib/bin + DESTINATION ${CMAKE_SOURCE_DIR}/release) + install( + FILES + ${BINARY_DIR}/src/${CMAKE_STATIC_LIBRARY_PREFIX}whisper.coreml${CMAKE_STATIC_LIBRARY_SUFFIX} + DESTINATION ${CMAKE_SOURCE_DIR}/release/lib) + endif() endif(WIN32) From 4bd560ca9847816db1c120b5e64db3fe52d47cab Mon Sep 17 00:00:00 2001 From: Roy Shilkrot Date: Mon, 29 Jul 2024 23:12:48 -0400 Subject: [PATCH 2/2] Update CMakeLists.txt to include Metal shader library installation for macOS release --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a2ee0e..3635141 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -209,7 +209,7 @@ else() DESTINATION ${CMAKE_SOURCE_DIR}/release) if(APPLE) # copy the Metal shader library to the release directory - install(DIRECTORY ${INSTALL_DIR}/lib/bin + install(DIRECTORY ${INSTALL_DIR}/bin DESTINATION ${CMAKE_SOURCE_DIR}/release) install( FILES