From 23fa10eee174a07583d433d23a97b2f981cbdb9f Mon Sep 17 00:00:00 2001 From: Adam Cozzette Date: Wed, 19 Apr 2023 17:11:04 -0700 Subject: [PATCH] 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 --- cmake/protobuf-generate.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/protobuf-generate.cmake b/cmake/protobuf-generate.cmake index 5a4ff391e0ed..57e8cc9d1070 100644 --- a/cmake/protobuf-generate.cmake +++ b/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}