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