From 8d06a5f7956ce1a95595c732dbf732cfa6880548 Mon Sep 17 00:00:00 2001 From: Derek G Foster Date: Sat, 7 Oct 2023 22:06:28 -0700 Subject: [PATCH] Update find_program() commands - 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 --- cmake/StratumDependencies.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/StratumDependencies.cmake b/cmake/StratumDependencies.cmake index 2c8e70a9..f3232281 100644 --- a/cmake/StratumDependencies.cmake +++ b/cmake/StratumDependencies.cmake @@ -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) @@ -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)