diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 951aa8340..2ce3c7c75 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -11,6 +11,8 @@ add_library(${TARGET} OBJECT grammar-parser.cpp train.h train.cpp + json.hpp + httplib.h ) if (BUILD_SHARED_LIBS) diff --git a/examples/server/httplib.h b/common/httplib.h similarity index 100% rename from examples/server/httplib.h rename to common/httplib.h diff --git a/examples/server/json.hpp b/common/json.hpp similarity index 100% rename from examples/server/json.hpp rename to common/json.hpp diff --git a/examples/server-parallel/CMakeLists.txt b/examples/server-parallel/CMakeLists.txt index 48c29e9ad..4df8b462f 100644 --- a/examples/server-parallel/CMakeLists.txt +++ b/examples/server-parallel/CMakeLists.txt @@ -1,6 +1,6 @@ set(TARGET server-parallel) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -add_executable(${TARGET} server.cpp ../server/json.hpp ../server/httplib.h) +add_executable(${TARGET} server.cpp) install(TARGETS ${TARGET} RUNTIME) target_compile_definitions(${TARGET} PRIVATE SERVER_VERBOSE=$ diff --git a/examples/server-parallel/server.cpp b/examples/server-parallel/server.cpp index 607d173e6..3db0cb753 100644 --- a/examples/server-parallel/server.cpp +++ b/examples/server-parallel/server.cpp @@ -2,8 +2,8 @@ #include "common.h" #include "llama.h" -#include "../server/httplib.h" -#include "../server/json.hpp" +#include "httplib.h" +#include "json.hpp" #include #include diff --git a/examples/server/CMakeLists.txt b/examples/server/CMakeLists.txt index 3782f9b80..407cf7b5d 100644 --- a/examples/server/CMakeLists.txt +++ b/examples/server/CMakeLists.txt @@ -1,7 +1,7 @@ set(TARGET server) option(LLAMA_SERVER_VERBOSE "Build verbose logging option for Server" ON) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -add_executable(${TARGET} server.cpp json.hpp httplib.h) +add_executable(${TARGET} server.cpp) install(TARGETS ${TARGET} RUNTIME) target_compile_definitions(${TARGET} PRIVATE SERVER_VERBOSE=$