Skip to content

Commit

Permalink
Update find_program() commands (#311)
Browse files Browse the repository at this point in the history
- Specify NO_CMAKE_FIND_ROOT_PATH when searching for the Protobuf
  compiler and gRPC plugin. We do this to ensure that we search the
  host depencies, not the target dependencies, when cross-compiling.

Signed-off-by: Derek G Foster <[email protected]>
  • Loading branch information
ffoulkes authored Oct 13, 2023
1 parent 2ed257d commit a542e2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/StratumDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ message(STATUS "Found gRPC version ${gRPC_VERSION}")
# Protobuf compiler.
# Runs on the development system.
#-----------------------------------------------------------------------
find_program(HOST_PROTOC "protoc")
find_program(HOST_PROTOC "protoc" NO_CMAKE_FIND_ROOT_PATH)
mark_as_advanced(HOST_PROTOC)

if(HOST_PROTOC)
Expand All @@ -66,7 +66,7 @@ endif()
# gRPC plugin for Protobuf compiler.
# Runs on the development system.
#-----------------------------------------------------------------------
find_program(HOST_GRPC_CPP_PLUGIN "grpc_cpp_plugin")
find_program(HOST_GRPC_CPP_PLUGIN "grpc_cpp_plugin" NO_CMAKE_FIND_ROOT_PATH)
mark_as_advanced(HOST_GRPC_CPP_PLUGIN)

if(HOST_GRPC_CPP_PLUGIN)
Expand Down

0 comments on commit a542e2e

Please sign in to comment.