Index: clangd/CMakeLists.txt =================================================================== --- clangd/CMakeLists.txt +++ clangd/CMakeLists.txt @@ -1,6 +1,5 @@ -add_clang_executable(clangd +add_clang_library(clangDaemon ClangdLSPServer.cpp - ClangdMain.cpp ClangdServer.cpp ClangdUnit.cpp ClangdUnitStore.cpp @@ -11,9 +10,7 @@ ProtocolHandlers.cpp ) -install(TARGETS clangd RUNTIME DESTINATION bin) - -target_link_libraries(clangd +target_link_libraries(clangDaemon clangBasic clangFormat clangFrontend @@ -22,3 +19,5 @@ clangToolingCore LLVMSupport ) + +add_subdirectory(tool) Index: clangd/tool/CMakeLists.txt =================================================================== --- clangd/tool/CMakeLists.txt +++ clangd/tool/CMakeLists.txt @@ -1,20 +1,12 @@ add_clang_executable(clangd - ClangdLSPServer.cpp ClangdMain.cpp - ClangdServer.cpp - ClangdUnit.cpp - ClangdUnitStore.cpp - DraftStore.cpp - GlobalCompilationDatabase.cpp - JSONRPCDispatcher.cpp - Protocol.cpp - ProtocolHandlers.cpp ) install(TARGETS clangd RUNTIME DESTINATION bin) target_link_libraries(clangd clangBasic + clangDaemon clangFormat clangFrontend clangSema Index: clangd/tool/ClangdMain.cpp =================================================================== --- clangd/tool/ClangdMain.cpp +++ clangd/tool/ClangdMain.cpp @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#include "ClangdLSPServer.h" -#include "JSONRPCDispatcher.h" +#include "../ClangdLSPServer.h" +#include "../JSONRPCDispatcher.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Program.h"