mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-25 02:00:48 +00:00
Fix emscripten build.
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user