diff --git a/CMakeLists.txt b/CMakeLists.txt index b34985da2..245cf10a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,13 +151,13 @@ if(MLX_BUILD_CPU) GIT_REPOSITORY https://github.com/OpenMathLib/OpenBLAS.git GIT_TAG v0.3.28 EXCLUDE_FROM_ALL) - set(NOFORTRAN ON) # msvc has no fortran compiler + set(BUILD_STATIC_LIBS ON) # link statically + set(NOFORTRAN ON) # msvc has no fortran compiler FetchContent_MakeAvailable(openblas) target_link_libraries(mlx PRIVATE openblas) target_include_directories( mlx PRIVATE "${openblas_SOURCE_DIR}/lapack-netlib/LAPACKE/include" - "${CMAKE_BINARY_DIR}/generated" - "${CMAKE_BINARY_DIR}") + "${CMAKE_BINARY_DIR}/generated" "${CMAKE_BINARY_DIR}") else() if(${CMAKE_HOST_APPLE}) # The blas shipped in macOS SDK is not supported, search homebrew for