Link python extension with mlx statically on Windows (#1716)

* Link python extension with mlx statically on Windows

* More readable code
This commit is contained in:
Cheng
2024-12-19 12:26:04 +09:00
committed by GitHub
parent 7480059306
commit ed4ec81bca
2 changed files with 10 additions and 6 deletions

View File

@@ -266,10 +266,7 @@ install(
EXPORT MLXTargets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME
DESTINATION
# On Windows, DLLs must be put in the same dir with the python bindings.
$<IF:$<BOOL:${WIN32}>,${CMAKE_INSTALL_PREFIX},${CMAKE_INSTALL_BINDIR}>
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
INCLUDES
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})