0fc2438ff6
- rework host-grpc-only-cpp-plugin.patch to match changed CMakeLists.txt - reintroduce patch to fix cross_compile with host grpc_cpp_plugin [1] - add patch to disable unconditionally downloading repos of 3rd party APIs not used in build [2] [1] https://github.com/grpc/grpc/pull/30378 [2] https://github.com/grpc/grpc/issues/30385 Signed-off-by: Michael Nosthoff <buildroot@heine.tech> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
44 lines
2.1 KiB
Diff
44 lines
2.1 KiB
Diff
From 6798193f062676fddf7fee6d0c928f8ce6d92894 Mon Sep 17 00:00:00 2001
|
|
From: Michael Nosthoff <buildroot@heine.tech>
|
|
Date: Thu, 21 Jul 2022 22:14:32 +0200
|
|
Subject: [PATCH] cmake: fix cross-compilation with
|
|
gRPC_BUILD_GRPC_CPP_PLUGIN=OFF
|
|
|
|
commit 99752b173cfa reintroduced the cross-compilation issue which was fixed by da10b795e177
|
|
|
|
upstream PR: https://github.com/grpc/grpc/pull/30378
|
|
|
|
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
|
|
|
|
---
|
|
CMakeLists.txt | 2 +-
|
|
templates/CMakeLists.txt.template | 2 +-
|
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 9cad96a12f95..11e7ae2b67df 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -514,7 +514,7 @@ function(protobuf_generate_grpc_cpp_with_import_path_correction FILE_LOCATION IM
|
|
--plugin=protoc-gen-grpc=${_gRPC_CPP_PLUGIN}
|
|
${_protobuf_include_path}
|
|
${REL_FIL}
|
|
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE_LOCATION} ${ABS_FIL} ${_gRPC_PROTOBUF_PROTOC} grpc_cpp_plugin
|
|
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE_LOCATION} ${ABS_FIL} ${_gRPC_PROTOBUF_PROTOC} ${_gRPC_CPP_PLUGIN}
|
|
WORKING_DIRECTORY ${_gRPC_PROTO_SRCS_DIR}
|
|
COMMENT "Running gRPC C++ protocol buffer compiler for ${IMPORT_PATH}"
|
|
VERBATIM)
|
|
diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template
|
|
index 161cf46798f1..82fe4217913a 100644
|
|
--- a/templates/CMakeLists.txt.template
|
|
+++ b/templates/CMakeLists.txt.template
|
|
@@ -498,7 +498,7 @@
|
|
--plugin=protoc-gen-grpc=<%text>${_gRPC_CPP_PLUGIN}</%text>
|
|
<%text>${_protobuf_include_path}</%text>
|
|
<%text>${REL_FIL}</%text>
|
|
- DEPENDS <%text>${CMAKE_CURRENT_SOURCE_DIR}/${FILE_LOCATION}</%text> <%text>${ABS_FIL}</%text> <%text>${_gRPC_PROTOBUF_PROTOC}</%text> grpc_cpp_plugin
|
|
+ DEPENDS <%text>${CMAKE_CURRENT_SOURCE_DIR}/${FILE_LOCATION}</%text> <%text>${ABS_FIL}</%text> <%text>${_gRPC_PROTOBUF_PROTOC}</%text> <%text>${_gRPC_CPP_PLUGIN}</%text>
|
|
WORKING_DIRECTORY <%text>${_gRPC_PROTO_SRCS_DIR}</%text>
|
|
COMMENT "Running gRPC C++ protocol buffer compiler for <%text>${IMPORT_PATH}</%text>"
|
|
VERBATIM)
|