mirror of
https://github.com/ml-explore/mlx.git
synced 2025-08-21 20:46:46 +08:00
fetch json
This commit is contained in:
parent
c043d27682
commit
3f82fe8888
@ -99,8 +99,17 @@ elseif (MLX_BUILD_METAL)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
MESSAGE(STATUS "Downloading json")
|
MESSAGE(STATUS "Downloading json")
|
||||||
find_package(nlohmann_json 3.11.3 REQUIRED)
|
FetchContent_Declare(
|
||||||
target_link_libraries(mlx nlohmann_json::nlohmann_json)
|
json
|
||||||
|
GIT_REPOSITORY "https://github.com/nlohmann/json"
|
||||||
|
GIT_TAG "v3.11.3"
|
||||||
|
)
|
||||||
|
FetchContent_MakeAvailable(json)
|
||||||
|
target_include_directories(
|
||||||
|
mlx PUBLIC
|
||||||
|
$<BUILD_INTERFACE:${json_SOURCE_DIR}/single_include/nlohmann>
|
||||||
|
$<INSTALL_INTERFACE:include/json>
|
||||||
|
)
|
||||||
|
|
||||||
find_library(ACCELERATE_LIBRARY Accelerate)
|
find_library(ACCELERATE_LIBRARY Accelerate)
|
||||||
if (MLX_BUILD_ARM AND ACCELERATE_LIBRARY)
|
if (MLX_BUILD_ARM AND ACCELERATE_LIBRARY)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <nlohmann/json.hpp>
|
#include <json.hpp>
|
||||||
|
|
||||||
#include "mlx/load.h"
|
#include "mlx/load.h"
|
||||||
#include "mlx/ops.h"
|
#include "mlx/ops.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user