[clang-tools-extra] [cmake] Link against libclang-cpp whenever possible
[lldb.git] / clang-tools-extra / clangd / tool / CMakeLists.txt
1 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
2 include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
3
4 add_clang_tool(clangd
5   ClangdMain.cpp
6   $<TARGET_OBJECTS:obj.clangDaemonTweaks>
7   )
8
9 set(LLVM_LINK_COMPONENTS
10   support
11   )
12
13 set(CLANGD_XPC_LIBS "")
14 if(CLANGD_BUILD_XPC)
15   list(APPEND CLANGD_XPC_LIBS "clangdXpcJsonConversions" "clangdXpcTransport")
16 endif()
17
18 clang_target_link_libraries(clangd
19   PRIVATE
20   clangAST
21   clangBasic
22   clangFormat
23   clangFrontend
24   clangSema
25   clangTooling
26   clangToolingCore
27   clangToolingRefactoring
28   clangToolingSyntax
29   )
30 target_link_libraries(clangd
31   PRIVATE
32   clangTidy
33   clangDaemon
34   ${CLANGD_XPC_LIBS}
35   )