--- CMakeLists.txt.orig 2026-04-03 13:41:06 +++ CMakeLists.txt 2026-04-03 13:46:46 @@ -309,13 +309,10 @@ set(MLX_BUILD_ACCELERATE OFF) endif() -message(STATUS "Downloading json") -FetchContent_Declare( - json - URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz) -FetchContent_MakeAvailable(json) -target_include_directories( - mlx PRIVATE $) +message(STATUS "Finding json") +find_package(nlohmann_json REQUIRED) +target_include_directories( + mlx PRIVATE $/nlohmann>) add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/mlx) --- mlx/distributed/jaccl/lib/CMakeLists.txt.orig 2026-05-12 15:17:38 +++ mlx/distributed/jaccl/lib/CMakeLists.txt 2026-05-12 15:19:06 @@ -15,11 +15,8 @@ include(FetchContent) # nlohmann/json for device file parsing -message(STATUS "Downloading json for JACCL") -FetchContent_Declare( - json - URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz) -FetchContent_MakeAvailable(json) +message(STATUS "Finding json") +find_package(nlohmann_json REQUIRED) # Check platform and SDK version requirements if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") @@ -56,7 +53,7 @@ $) target_include_directories( - jaccl PRIVATE $) + jaccl PRIVATE $/nlohmann>) target_compile_features(jaccl PUBLIC cxx_std_20)