Skip to content

Commit

Permalink
Download dlfcn-win32
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed Dec 7, 2024
1 parent 79abdd4 commit 8289373
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,14 @@ if(WIN32)
if(MSVC)
# GGUF does not build with MSVC.
set(MLX_BUILD_GGUF OFF)
else()
# Needed for building with MinGW.
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()
FetchContent_Declare(
dlfcn-win32
GIT_REPOSITORY https://github.com/dlfcn-win32/dlfcn-win32.git
GIT_TAG v1.4.1)
FetchContent_MakeAvailable(dlfcn-win32)
target_include_directories(mlx PRIVATE ${dlfcn-win32_SOURCE_DIR}/src)
target_link_libraries(mlx PRIVATE dlfcn-win32)
endif()

find_package(MPI)
Expand Down

0 comments on commit 8289373

Please sign in to comment.