This is an automated email from the ASF dual-hosted git repository.
raulcd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new edd62f7532 GH-41581: [C++][CMake] correctly use
Protobuf_PROTOC_EXECUTABLE (#41582)
edd62f7532 is described below
commit edd62f75326c86edc22e705e13b0674acd7cc1c1
Author: h-vetinari <[email protected]>
AuthorDate: Thu May 16 02:07:45 2024 +1100
GH-41581: [C++][CMake] correctly use Protobuf_PROTOC_EXECUTABLE (#41582)
Fixes #41581
* GitHub Issue: #41581
Lead-authored-by: H. Vetinari <[email protected]>
Co-authored-by: Raúl Cumplido <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
---
cpp/cmake_modules/FindProtobufAlt.cmake | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/cpp/cmake_modules/FindProtobufAlt.cmake
b/cpp/cmake_modules/FindProtobufAlt.cmake
index f343b42f2b..703e05c473 100644
--- a/cpp/cmake_modules/FindProtobufAlt.cmake
+++ b/cpp/cmake_modules/FindProtobufAlt.cmake
@@ -31,6 +31,11 @@ endif()
find_package(protobuf CONFIG ${find_package_args})
set(ProtobufAlt_FOUND ${protobuf_FOUND})
if(ProtobufAlt_FOUND)
+ if(Protobuf_PROTOC_EXECUTABLE)
+ # work around https://github.com/protocolbuffers/protobuf/issues/14576
+ set_target_properties(protobuf::protoc PROPERTIES IMPORTED_LOCATION_RELEASE
+
"${Protobuf_PROTOC_EXECUTABLE}")
+ endif()
set(ProtobufAlt_VERSION ${protobuf_VERSION})
set(ProtobufAlt_VERSION_MAJOR ${protobuf_VERSION_MAJOR})
set(ProtobufAlt_VERSION_MINOR ${protobuf_VERSION_MINOR})