summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre@debian.org>2023-01-05 15:16:10 +0100
committerSylvestre Ledru <sylvestre@debian.org>2023-01-10 21:01:37 +0100
commit9f3081dc6fe8447e85741865846840bc491866e5 (patch)
treefd959a526cbfe94afc8da9dad156b4c2f2247f13 /cmake
parent69bbcdd0aba9bbfad8957860e24a792b85017146 (diff)
downloadllvm-9f3081dc6fe8447e85741865846840bc491866e5.tar.gz
build: with -DCLANGD_ENABLE_REMOTE=ON, search for grpc++ dependencies too
Fixes: https://github.com/llvm/llvm-project/issues/59844 Differential Revision: https://reviews.llvm.org/D141047
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/FindGRPC.cmake17
1 files changed, 17 insertions, 0 deletions
diff --git a/cmake/Modules/FindGRPC.cmake b/cmake/Modules/FindGRPC.cmake
index a559da499963..a6dec2a26a69 100644
--- a/cmake/Modules/FindGRPC.cmake
+++ b/cmake/Modules/FindGRPC.cmake
@@ -82,11 +82,28 @@ else()
endif()
endif()
if(NOT TARGET grpc++)
+ find_library(GPR_LIBRARY gpr ${GRPC_OPTS} REQUIRED)
+ add_library(gpr UNKNOWN IMPORTED GLOBAL)
+ message(STATUS "Using gpr: " ${GPR_LIBRARY})
+ set_target_properties(gpr PROPERTIES IMPORTED_LOCATION ${GPR_LIBRARY})
+
find_library(GRPC_LIBRARY grpc++ ${GRPC_OPTS} REQUIRED)
add_library(grpc++ UNKNOWN IMPORTED GLOBAL)
message(STATUS "Using grpc++: " ${GRPC_LIBRARY})
set_target_properties(grpc++ PROPERTIES IMPORTED_LOCATION ${GRPC_LIBRARY})
target_include_directories(grpc++ INTERFACE ${GRPC_INCLUDE_PATHS})
+ find_library(GRPC2_LIBRARY grpc ${GRPC_OPTS} REQUIRED)
+ add_library(grpc UNKNOWN IMPORTED GLOBAL)
+ message(STATUS "Using grpc: " ${GRPC2_LIBRARY})
+ set_target_properties(grpc PROPERTIES IMPORTED_LOCATION ${GRPC2_LIBRARY})
+
+ find_library(ABSL_SYNCHRONIZATION_LIBRARY absl_synchronization ${GRPC_OPTS} QUIET)
+ if (ABSL_SYNCHRONIZATION_LIBRARY)
+ add_library(absl_synchronization UNKNOWN IMPORTED GLOBAL)
+ message(STATUS "Using absl_synchronization: " ${ABSL_SYNCHRONIZATION_LIBRARY})
+ set_target_properties(absl_synchronization PROPERTIES IMPORTED_LOCATION ${ABSL_SYNCHRONIZATION_LIBRARY})
+ endif()
+
if (ENABLE_GRPC_REFLECTION)
find_library(GRPC_REFLECTION_LIBRARY grpc++_reflection ${GRPC_OPTS} REQUIRED)
add_library(grpc++_reflection UNKNOWN IMPORTED GLOBAL)