From 35c6359155d6082d279ba86b94125d684d435dad Mon Sep 17 00:00:00 2001 From: Armin Kuster Date: Mon, 5 Mar 2018 16:46:25 -0800 Subject: grpc: move it from oe to networking layer grpc has dependancy on meta-networking packages. Signed-off-by: Armin Kuster --- ...txt-Fix-grpc_cpp_plugin-path-during-cross.patch | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch (limited to 'meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch') diff --git a/meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch b/meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch new file mode 100644 index 0000000000..5774e62eb1 --- /dev/null +++ b/meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch @@ -0,0 +1,68 @@ +From cc6dbabea0e452ebc93682df860a79ed9a45722e Mon Sep 17 00:00:00 2001 +From: Alexey Firago +Date: Fri, 20 Oct 2017 00:04:19 +0300 +Subject: [PATCH] CMakeLists.txt: Fix grpc_cpp_plugin path during + cross-compilation + +Signed-off-by: Alexey Firago +--- + CMakeLists.txt | 9 ++++++++- + templates/CMakeLists.txt.template | 9 ++++++++- + 2 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f9cd630..9663934 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -328,6 +328,13 @@ function(protobuf_generate_grpc_cpp) + return() + endif() + ++ #if cross-compiling, find host plugin ++ if(CMAKE_CROSSCOMPILING) ++ find_program(gRPC_CPP_PLUGIN grpc_cpp_plugin) ++ else() ++ set(gRPC_CPP_PLUGIN $) ++ endif() ++ + set(_protobuf_include_path -I . -I ${PROTOBUF_WELLKNOWN_IMPORT_DIR}) + foreach(FIL ${ARGN}) + get_filename_component(ABS_FIL ${FIL} ABSOLUTE) +@@ -345,7 +352,7 @@ function(protobuf_generate_grpc_cpp) + COMMAND ${_gRPC_PROTOBUF_PROTOC_EXECUTABLE} + ARGS --grpc_out=generate_mock_code=true:${_gRPC_PROTO_GENS_DIR} + --cpp_out=${_gRPC_PROTO_GENS_DIR} +- --plugin=protoc-gen-grpc=$ ++ --plugin=protoc-gen-grpc=${gRPC_CPP_PLUGIN} + ${_protobuf_include_path} + ${REL_FIL} + DEPENDS ${ABS_FIL} ${_gRPC_PROTOBUF_PROTOC} grpc_cpp_plugin +diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template +index 64daf04..a7e8629 100644 +--- a/templates/CMakeLists.txt.template ++++ b/templates/CMakeLists.txt.template +@@ -373,6 +373,13 @@ + return() + endif() + ++ #if cross-compiling, find host plugin ++ if(CMAKE_CROSSCOMPILING) ++ find_program(gRPC_CPP_PLUGIN grpc_cpp_plugin) ++ else() ++ set(gRPC_CPP_PLUGIN $) ++ endif() ++ + set(_protobuf_include_path -I . -I <%text>${PROTOBUF_WELLKNOWN_IMPORT_DIR}) + foreach(FIL <%text>${ARGN}) + get_filename_component(ABS_FIL <%text>${FIL} ABSOLUTE) +@@ -390,7 +397,7 @@ + COMMAND <%text>${_gRPC_PROTOBUF_PROTOC_EXECUTABLE} + ARGS --grpc_out=<%text>generate_mock_code=true:${_gRPC_PROTO_GENS_DIR} + --cpp_out=<%text>${_gRPC_PROTO_GENS_DIR} +- --plugin=protoc-gen-grpc=$ ++ --plugin=protoc-gen-grpc=${gRPC_CPP_PLUGIN} + <%text>${_protobuf_include_path} + <%text>${REL_FIL} + DEPENDS <%text>${ABS_FIL} <%text>${_gRPC_PROTOBUF_PROTOC} grpc_cpp_plugin +-- +2.7.4 -- cgit 1.2.3-korg