Fix reference to protoc binary in protobuf-generate.cmake

This should fix #12374, #12375, and #12450. The `protobuf_PROTOC_EXEC` variable
is not defined, and I think `protobuf::protoc` is what we should be using
instead.

PiperOrigin-RevId: 525591320
pull/12510/head
Adam Cozzette 2 years ago committed by Copybara-Service
parent 866dfe6a68
commit b30259722d
  1. 2
      cmake/protobuf-generate.cmake

@ -137,7 +137,7 @@ function(protobuf_generate)
add_custom_command(
OUTPUT ${_generated_srcs}
COMMAND ${protobuf_PROTOC_EXE}
COMMAND protobuf::protoc
ARGS ${protobuf_generate_PROTOC_OPTIONS} --${protobuf_generate_LANGUAGE}_out ${_plugin_options}:${protobuf_generate_PROTOC_OUT_DIR} ${_plugin} ${_protobuf_include_path} ${_abs_file}
DEPENDS ${_abs_file} ${protobuf_PROTOC_EXE} ${protobuf_generate_DEPENDENCIES}
COMMENT ${_comment}

Loading…
Cancel
Save