forked from jengelh/grpc
Accepting request 1110833 from home:pazhukov
fix `gRPCConfig.cmake` OBS-URL: https://build.opensuse.org/request/show/1110833 OBS-URL: https://build.opensuse.org/package/show/devel:tools/grpc?expand=0&rev=156
This commit is contained in:
parent
bb1cf96b1a
commit
8b0dd2b1a2
32
fix_grpconfig_cmake.patch
Normal file
32
fix_grpconfig_cmake.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From 117dc80eb43021dd5619023ef6d02d0d6ec7ae7a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
|
||||||
|
Date: Wed, 7 Jun 2023 13:06:49 +0800
|
||||||
|
Subject: [PATCH] [Build] fix `gRPCConfig.cmake`
|
||||||
|
|
||||||
|
Without this change, calling `find_package(gRPC REQUIRED)` errors out
|
||||||
|
with
|
||||||
|
|
||||||
|
CMake Error at /opt/homebrew/lib/cmake/grpc/gRPCConfig.cmake:8 (find_dependency):
|
||||||
|
Unknown CMake command "find_dependency".
|
||||||
|
|
||||||
|
The issue is that `find_dependency` is provided by the
|
||||||
|
`CMakeFindDependencyMacro` module[^1], so we need to `include` it before
|
||||||
|
use.
|
||||||
|
|
||||||
|
[^1]: https://cmake.org/cmake/help/v3.26/module/CMakeFindDependencyMacro.html
|
||||||
|
---
|
||||||
|
cmake/protobuf.cmake | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/cmake/protobuf.cmake b/cmake/protobuf.cmake
|
||||||
|
index 80181c62186c..fab2eb00e964 100644
|
||||||
|
--- a/cmake/protobuf.cmake
|
||||||
|
+++ b/cmake/protobuf.cmake
|
||||||
|
@@ -86,6 +86,6 @@ elseif(gRPC_PROTOBUF_PROVIDER STREQUAL "package")
|
||||||
|
set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE ${PROTOBUF_PROTOC_EXECUTABLE})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
- set(_gRPC_FIND_PROTOBUF "find_dependency(Protobuf CONFIG)")
|
||||||
|
+ set(_gRPC_FIND_PROTOBUF "include(CMakeFindDependencyMacro)\nfind_dependency(Protobuf CONFIG)")
|
||||||
|
endif()
|
||||||
|
endif()
|
@ -39,6 +39,7 @@ BuildRequires: pkgconfig(openssl) >= 1.0.1
|
|||||||
BuildRequires: pkgconfig(protobuf) >= 22
|
BuildRequires: pkgconfig(protobuf) >= 22
|
||||||
BuildRequires: pkgconfig(re2)
|
BuildRequires: pkgconfig(re2)
|
||||||
BuildRequires: pkgconfig(zlib)
|
BuildRequires: pkgconfig(zlib)
|
||||||
|
Patch0: fix_grpconfig_cmake.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The reference implementation of the gRPC protocol, done on top of
|
The reference implementation of the gRPC protocol, done on top of
|
||||||
|
Loading…
Reference in New Issue
Block a user