mirror of
https://github.com/ml-explore/mlx.git
synced 2025-06-25 01:41:17 +08:00
CMake: Build with dlfcn-win32 to have dlopen etc. on win32 (#1628)
Cf. https://github.com/JuliaPackaging/Yggdrasil/pull/9761
This commit is contained in:
parent
211411faf2
commit
698e63a608
@ -160,6 +160,13 @@ if(MLX_BUILD_CPU)
|
|||||||
message(STATUS "Blas include " ${BLAS_INCLUDE_DIRS})
|
message(STATUS "Blas include " ${BLAS_INCLUDE_DIRS})
|
||||||
target_include_directories(mlx PRIVATE ${BLAS_INCLUDE_DIRS})
|
target_include_directories(mlx PRIVATE ${BLAS_INCLUDE_DIRS})
|
||||||
target_link_libraries(mlx PUBLIC ${BLAS_LIBRARIES})
|
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()
|
endif()
|
||||||
else()
|
else()
|
||||||
set(MLX_BUILD_ACCELERATE OFF)
|
set(MLX_BUILD_ACCELERATE OFF)
|
||||||
|
Loading…
Reference in New Issue
Block a user