pin-server/0030-Pin-server-fix-the-adaptation-to-grpc-1.54.2.patch
2023-08-14 15:47:33 +08:00

45 lines
1.3 KiB
Diff

From 33aad2ac03adb20a71c430d5daa2ee52a6a96480 Mon Sep 17 00:00:00 2001
From: dingguangya <dingguangya1@huawei.com>
Date: Mon, 14 Aug 2023 14:45:31 +0800
Subject: [PATCH] [Pin-server] fix the adaptation to grpc-1.54.2
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0a72863..df8b634 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -76,6 +76,8 @@ add_library(plg_grpc_proto STATIC
${plg_proto_srcs}
${plg_proto_hdrs})
target_link_libraries(plg_grpc_proto
+ ${GRPC_LIBRARY}
+ ${GPR_LIBRARY}
${GRPC_PP_REFLECTION_LIBRARY}
${GRPC_PP_LIBRARY}
${PROTOBUF_LIBRARY})
@@ -109,6 +111,8 @@ target_link_libraries(pin_server
pin_user
${JSONCPP_LIBRARY}
plg_grpc_proto
+ ${GRPC_LIBRARY}
+ ${GPR_LIBRARY}
${GRPC_PP_REFLECTION_LIBRARY}
${GRPC_PP_LIBRARY}
${PROTOBUF_LIBRARY}
diff --git a/cmake/common.cmake b/cmake/common.cmake
index cf48699..033d8c3 100644
--- a/cmake/common.cmake
+++ b/cmake/common.cmake
@@ -35,6 +35,8 @@ find_library(GRPC_PP_LIBRARY grpc++)
_CHECK(GRPC_PP_LIBRARY "GRPC_PP_LIBRARY-NOTFOUND" "libgrpc++.so")
find_library(GRPC_LIBRARY grpc)
_CHECK(GRPC_LIBRARY "GRPC_LIBRARY-NOTFOUND" "libgrpc.so")
+find_library(GPR_LIBRARY gpr)
+_CHECK(GPR_LIBRARY "GPR_LIBRARY-NOTFOUND" "libgpr.so")
# check abseil_synchronization
find_library(ABSEIL_SYNC_LIBRARY absl_synchronization)
--
2.33.0.windows.2