allow build python lib without specifying path (#1799)

This commit is contained in:
Awni Hannun 2025-01-27 11:22:35 -08:00 committed by GitHub
parent 121d9a0702
commit 28091aa1ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,7 +27,11 @@ nanobind_add_module(
${CMAKE_CURRENT_SOURCE_DIR}/utils.cpp)
if(NOT MLX_PYTHON_BINDINGS_OUTPUT_DIRECTORY)
set(MLX_PYTHON_BINDINGS_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
if(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
set(MLX_PYTHON_BINDINGS_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
else()
set(MLX_PYTHON_BINDINGS_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
endif()
endif()
set_target_properties(