From 7ed356d6203de2e1e324d14ef513f0bbf12581f6 Mon Sep 17 00:00:00 2001 From: James R Date: Wed, 26 Apr 2023 16:11:25 -0700 Subject: [PATCH] thirdparty: add nlohmann/json --- src/CMakeLists.txt | 2 ++ thirdparty/CMakeLists.txt | 2 ++ thirdparty/cpm-nlohmann-json.cmake | 6 ++++++ 3 files changed, 10 insertions(+) create mode 100644 thirdparty/cpm-nlohmann-json.cmake diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 43ad42f65..81c871de6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -254,6 +254,8 @@ if(SRB2_CONFIG_ENABLE_WEBM_MOVIES) target_compile_definitions(SRB2SDL2 PRIVATE -DSRB2_CONFIG_ENABLE_WEBM_MOVIES) endif() +target_link_libraries(SRB2SDL2 PRIVATE nlohmann_json::nlohmann_json) + set(SRB2_HAVE_THREADS ON) target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_THREADS) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index f36851150..aecb684e1 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -34,6 +34,8 @@ if (SRB2_CONFIG_ENABLE_WEBM_MOVIES) include("cpm-libyuv.cmake") endif() +include("cpm-nlohmann-json.cmake") + add_subdirectory(tcbrindle_span) add_subdirectory(stb_vorbis) add_subdirectory(stb_rect_pack) diff --git a/thirdparty/cpm-nlohmann-json.cmake b/thirdparty/cpm-nlohmann-json.cmake new file mode 100644 index 000000000..c7d76ccd3 --- /dev/null +++ b/thirdparty/cpm-nlohmann-json.cmake @@ -0,0 +1,6 @@ +CPMAddPackage( + NAME nlohmann_json + VERSION 3.11.2 + URL "https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz" + EXCLUDE_FROM_ALL ON +)