Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ build*
!build-info.sh
!build.zig
!docs/build.md
lib/**
/libllama.so
/llama-*
/vulkan-shaders-gen
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "test/googletest"]
path = test/googletest
url = https://github.com/google/googletest.git
url = https://github.com/google/googletest.git
30 changes: 30 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,36 @@ endif()
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/common)

if(DEFINED CPP_HTTPLIB_PATH)
if (IS_DIRECTORY ${CPP_HTTPLIB_PATH} AND EXISTS ${CPP_HTTPLIB_PATH}/httplib.h)
message(STATUS "Using user provided cpp-httplib: ${CPP_HTTPLIB_PATH}")
include_directories(${CPP_HTTPLIB_PATH})
else()
message(FATAL_ERROR "user provided cpp-httplib not found")
endif()
elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib/cpp-httplib)
message(STATUS "Using git submodule provided cpp-httplib")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/lib/cpp-httplib)
else()
message(STATUS "Using builtin provided cpp-httplib")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/common/cpp-httplib)
endif()

if(DEFINED NLOHMANN_JSON_PATH)
if (IS_DIRECTORY ${NLOHMANN_JSON_PATH}/include) #AND EXISTS ${NLOHMANN_JSON_PATH}/include/nlohmann/json.hpp)
message(STATUS "Using user provided nlohmann-json: ${NLOHMANN_JSON_PATH}")
include_directories(${NLOHMANN_JSON_PATH}/include)
else()
message(FATAL_ERROR "user provided nlohmann-json not found")
endif()
elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib/nlohmann-json)
message(STATUS "Using git submodule provided nlohmann-json")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/lib/nlohmann-json/include)
else()
message(STATUS "Using builtin provided nlohmann-json")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/common/nlohmann-json)
endif()

# Add MCP library
add_subdirectory(src)

Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions include/mcp_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <stdexcept>

// Include the JSON library for parsing and generating JSON
#include "json.hpp"
#include "nlohmann/json.hpp"

namespace mcp {

Expand Down Expand Up @@ -193,4 +193,4 @@ struct response {

} // namespace mcp

#endif // MCP_MESSAGE_H
#endif // MCP_MESSAGE_H