summaryrefslogtreecommitdiff
path: root/0044-2289-check-protobuf-and-grpc-version-in-cmake-for-cr.patch
diff options
context:
space:
mode:
Diffstat (limited to '0044-2289-check-protobuf-and-grpc-version-in-cmake-for-cr.patch')
-rw-r--r--0044-2289-check-protobuf-and-grpc-version-in-cmake-for-cr.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/0044-2289-check-protobuf-and-grpc-version-in-cmake-for-cr.patch b/0044-2289-check-protobuf-and-grpc-version-in-cmake-for-cr.patch
new file mode 100644
index 0000000..5fa3a05
--- /dev/null
+++ b/0044-2289-check-protobuf-and-grpc-version-in-cmake-for-cr.patch
@@ -0,0 +1,40 @@
+From 8045fcfb3765698d8cc3f07186fcc29d6702ee71 Mon Sep 17 00:00:00 2001
+From: jake <jikai11@huawei.com>
+Date: Thu, 30 Nov 2023 11:58:47 +0000
+Subject: [PATCH 44/64] !2289 check protobuf and grpc version in cmake for cri
+ v1 * check protobuf and grpc version in cmake for cri v1
+
+---
+ cmake/checker.cmake | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/cmake/checker.cmake b/cmake/checker.cmake
+index cc4a1fc3..e19618e4 100644
+--- a/cmake/checker.cmake
++++ b/cmake/checker.cmake
+@@ -125,7 +125,11 @@ endif()
+
+ if (GRPC_CONNECTOR)
+ # check protobuf
+- pkg_check_modules(PC_PROTOBUF "protobuf>=3.1.0")
++ if (ENABLE_CRI_API_V1)
++ pkg_check_modules(PC_PROTOBUF "protobuf>=3.14.0")
++ else()
++ pkg_check_modules(PC_PROTOBUF "protobuf>=3.1.0")
++ endif()
+ find_library(PROTOBUF_LIBRARY protobuf
+ HINTS ${PC_PROTOBUF_LIBDIR} ${PC_PROTOBUF_LIBRARY_DIRS})
+ _CHECK(PROTOBUF_LIBRARY "PROTOBUF_LIBRARY-NOTFOUND" "libprotobuf.so")
+@@ -136,6 +140,9 @@ if (GRPC_CONNECTOR)
+ _CHECK(CMD_GRPC_CPP_PLUGIN "CMD_GRPC_CPP_PLUGIN-NOTFOUND" "grpc_cpp_plugin")
+
+ # check grpc
++ if (ENABLE_CRI_API_V1)
++ pkg_check_modules(PC_GRPC++ "grpc++>=1.41.0")
++ endif()
+ find_path(GRPC_INCLUDE_DIR grpc/grpc.h)
+ _CHECK(GRPC_INCLUDE_DIR "GRPC_INCLUDE_DIR-NOTFOUND" "grpc/grpc.h")
+ find_library(GRPC_PP_REFLECTION_LIBRARY grpc++_reflection)
+--
+2.42.0
+