mirror of
https://github.com/ml-explore/mlx.git
synced 2025-09-12 15:24:57 +08:00
fix linux linking error (#2248)
This commit is contained in:
@@ -54,5 +54,9 @@ target_link_libraries(core PRIVATE mlx)
|
||||
target_compile_definitions(core PRIVATE _VERSION_=${MLX_VERSION})
|
||||
|
||||
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()
|
||||
|
Reference in New Issue
Block a user