mirror of
https://github.com/ml-explore/mlx.git
synced 2025-06-24 17:31:16 +08:00
fix linux linking error (#2248)
This commit is contained in:
parent
c763fe1be0
commit
a5ac9244c4
@ -54,5 +54,9 @@ target_link_libraries(core PRIVATE mlx)
|
|||||||
target_compile_definitions(core PRIVATE _VERSION_=${MLX_VERSION})
|
target_compile_definitions(core PRIVATE _VERSION_=${MLX_VERSION})
|
||||||
|
|
||||||
if(BUILD_SHARED_LIBS)
|
if(BUILD_SHARED_LIBS)
|
||||||
target_link_options(core PRIVATE -Wl,-rpath,@loader_path/lib)
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
|
target_link_options(core PRIVATE -Wl,-rpath,@loader_path/lib)
|
||||||
|
else()
|
||||||
|
target_link_options(core PRIVATE -Wl,-rpath,\$ORIGIN/lib)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user