diff --git a/cmake/vendor.cmake b/cmake/vendor.cmake index 2bdbb90f..03d4c1a9 100644 --- a/cmake/vendor.cmake +++ b/cmake/vendor.cmake @@ -194,6 +194,15 @@ CPMAddPackage( EXCLUDE_FROM_ALL TRUE ) +# json + +CPMAddPackage( + NAME json + GITHUB_REPOSITORY nlohmann/json + GIT_TAG v3.12.0 + EXCLUDE_FROM_ALL TRUE +) + if(NOT EMSCRIPTEN) # base64 @@ -222,15 +231,6 @@ if(NOT EMSCRIPTEN) EXCLUDE_FROM_ALL TRUE ) - # json - - CPMAddPackage( - NAME json - GITHUB_REPOSITORY nlohmann/json - GIT_TAG v3.12.0 - EXCLUDE_FROM_ALL TRUE - ) - # usearch CPMAddPackage( diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt index 0679ff7b..84172023 100644 --- a/profiler/CMakeLists.txt +++ b/profiler/CMakeLists.txt @@ -240,6 +240,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE TracyServer TracyImGui Threads::Threads + nlohmann_json::nlohmann_json ) target_include_directories(${PROJECT_NAME} PRIVATE ${tidy_SOURCE_DIR}/include @@ -250,7 +251,6 @@ if(NOT EMSCRIPTEN) base64 tidy-static TracyPugixml - nlohmann_json::nlohmann_json usearch md4c ) diff --git a/profiler/src/profiler/TracyView.cpp b/profiler/src/profiler/TracyView.cpp index e5f70c8b..2aaa4738 100644 --- a/profiler/src/profiler/TracyView.cpp +++ b/profiler/src/profiler/TracyView.cpp @@ -1468,8 +1468,10 @@ bool View::WasActive() const void View::AddLlmAttachment( const nlohmann::json& json ) { +#ifndef __EMSCRIPTEN__ m_llm.AddAttachment( json.dump( 2 ), "user" ); m_llm.m_show = true; +#endif } }