Skip to content

Commit

Permalink
cross compling grpc_cpp_plugin not found bug (#982)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanchann authored Sep 22, 2021
1 parent 5ae482c commit 93b3105
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmake/opentelemetry-proto.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,12 @@ foreach(IMPORT_DIR ${PROTOBUF_IMPORT_DIRS})
list(APPEND PROTOBUF_INCLUDE_FLAGS "-I${IMPORT_DIR}")
endforeach()

set(gRPC_CPP_PLUGIN_EXECUTABLE $<TARGET_FILE:gRPC::grpc_cpp_plugin>)

if(CMAKE_CROSSCOMPILING)
find_program(gRPC_CPP_PLUGIN_EXECUTABLE grpc_cpp_plugin)
else()
set(gRPC_CPP_PLUGIN_EXECUTABLE $<TARGET_FILE:gRPC::grpc_cpp_plugin>)
endif()

add_custom_command(
OUTPUT ${COMMON_PB_H_FILE}
Expand Down

0 comments on commit 93b3105

Please sign in to comment.