avoid using find_library to make install truly portable (#1416)

This commit is contained in:
jjuang-apple 2024-09-16 13:21:32 -07:00 committed by GitHub
parent d5ed4d7a71
commit 6bbcc453ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -67,9 +67,9 @@ cmake_policy(SET CMP0135 NEW)
add_library(mlx)
if(MLX_BUILD_METAL)
find_library(METAL_LIB Metal)
find_library(FOUNDATION_LIB Foundation)
find_library(QUARTZ_LIB QuartzCore)
set(METAL_LIB "-framework Metal")
set(FOUNDATION_LIB "-framework Foundation")
set(QUARTZ_LIB "-framework QuartzCore")
endif()
if(MLX_BUILD_METAL AND NOT METAL_LIB)