Link with prebuilt OpenBLAS and fix shared libs build on Windows (#3036)

This commit is contained in:
Cheng
2026-01-23 11:17:26 +09:00
committed by GitHub
parent becc769012
commit 1650c4905a
6 changed files with 33 additions and 52 deletions
-8
View File
@@ -3,14 +3,6 @@ function(build_example SRCFILE)
set(target "${src_name}")
add_executable(${target} ${SRCFILE})
target_link_libraries(${target} PRIVATE mlx)
# On Windows, copy the mlx DLL to the executable directory for runtime loading
if(WIN32 AND BUILD_SHARED_LIBS)
add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:mlx>
$<TARGET_FILE_DIR:${target}>)
endif()
endfunction(build_example)
build_example(tutorial.cpp)