From 19be8268695bb8c1a7bb0fc954a93c125119205b Mon Sep 17 00:00:00 2001 From: zhenyan121 <3367366583@qq.com> Date: Wed, 24 Dec 2025 20:54:53 +0800 Subject: [PATCH] Added nlohmann/json --- CMakeLists.txt | 1 + cmake/SDL.cmake | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a9eb2b..73ede5e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,6 +56,7 @@ target_link_libraries(${PROJECT_NAME} SDL3::SDL3 SDL3_ttf::SDL3_ttf SDL3_image::SDL3_image + nlohmann_json::nlohmann_json ) # ========== Windows: 复制 DLL ========== diff --git a/cmake/SDL.cmake b/cmake/SDL.cmake index 7f6738e..7f21b79 100644 --- a/cmake/SDL.cmake +++ b/cmake/SDL.cmake @@ -35,4 +35,12 @@ FetchContent_Declare( GIT_TAG release-3.2.0 ) -FetchContent_MakeAvailable(SDL3_image) \ No newline at end of file +FetchContent_MakeAvailable(SDL3_image) + +FetchContent_Declare( + nlohmann_json + GIT_REPOSITORY https://github.com/nlohmann/json.git + GIT_TAG v3.12.0 +) + +FetchContent_MakeAvailable(nlohmann_json) \ No newline at end of file