diff --git a/CMakeLists.txt b/CMakeLists.txt index f7461dfa7..303efbfed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -160,6 +160,13 @@ if(MLX_BUILD_CPU) message(STATUS "Blas include " ${BLAS_INCLUDE_DIRS}) target_include_directories(mlx PRIVATE ${BLAS_INCLUDE_DIRS}) target_link_libraries(mlx PUBLIC ${BLAS_LIBRARIES}) + + if(WIN32) + find_package(dlfcn-win32 REQUIRED) + message(STATUS "dlfcn-win32 lib " ${dlfcn-win32_LIBRARIES}) + message(STATUS "dlfcn-win32 include " ${dlfcn-win32_INCLUDE_DIRS}) + target_link_libraries(mlx PUBLIC ${dlfcn-win32_LIBRARIES}) + endif() endif() else() set(MLX_BUILD_ACCELERATE OFF)