Skip to content

Commit

Permalink
[C++][CMake] correctly use Protobuf_PROTOC_EXECUTABLE
Browse files Browse the repository at this point in the history
Authored-by: H. Vetinari <[email protected]>
Co-authored-by: Raúl Cumplido <[email protected]>
Signed-off-by: H. Vetinari <[email protected]>
  • Loading branch information
h-vetinari and raulcd committed May 8, 2024
1 parent 5385926 commit efa7ed1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cpp/cmake_modules/FindProtobufAlt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ 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})
Expand Down

0 comments on commit efa7ed1

Please sign in to comment.