-
-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy path0004-force-protoc-executable.patch
More file actions
37 lines (35 loc) · 1.53 KB
/
0004-force-protoc-executable.patch
File metadata and controls
37 lines (35 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From cef9dba1a11445cc2c5adb90425ec77e2501056c Mon Sep 17 00:00:00 2001
From: "Uwe L. Korn" <uwe.korn@quantco.com>
Date: Fri, 11 Sep 2020 14:20:04 +0200
Subject: [PATCH 04/18] force protoc executable
---
cmake/protobuf.cmake | 17 ++---------------
1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a/cmake/protobuf.cmake b/cmake/protobuf.cmake
index ad80ca6e46..7bae8d95bd 100644
--- a/cmake/protobuf.cmake
+++ b/cmake/protobuf.cmake
@@ -70,21 +70,8 @@ elseif(gRPC_PROTOBUF_PROVIDER STREQUAL "package")
endif()
# Well-known proto files are expected to be in the Protobuf include directory.
get_target_property(_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR ${_gRPC_PROTOBUF_LIBRARIES} INTERFACE_INCLUDE_DIRECTORIES)
- if(TARGET protobuf::protoc)
- set(_gRPC_PROTOBUF_PROTOC protobuf::protoc)
- if(CMAKE_CROSSCOMPILING)
- find_program(_gRPC_PROTOBUF_PROTOC_EXECUTABLE protoc)
- else()
- set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE $<TARGET_FILE:protobuf::protoc>)
- endif()
- else()
- set(_gRPC_PROTOBUF_PROTOC ${PROTOBUF_PROTOC_EXECUTABLE})
- if(CMAKE_CROSSCOMPILING)
- find_program(_gRPC_PROTOBUF_PROTOC_EXECUTABLE protoc)
- else()
- set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE ${PROTOBUF_PROTOC_EXECUTABLE})
- endif()
- endif()
+ set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE ${Protobuf_PROTOC_EXECUTABLE})
+ set(_gRPC_PROTOBUF_PROTOC ${Protobuf_PROTOC_EXECUTABLE})
set(_gRPC_FIND_PROTOBUF "include(CMakeFindDependencyMacro)\nfind_dependency(Protobuf CONFIG)")
endif()
endif()