From e0251a35645a6baaa8fc9115e18f95ca1bf1843e Mon Sep 17 00:00:00 2001 From: joel Date: Mon, 12 Nov 2018 09:27:02 -0800 Subject: [PATCH] grpc bin default path when cross compiling --- cmake/build_dependencies.cmake | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/cmake/build_dependencies.cmake b/cmake/build_dependencies.cmake index beccdb0..310663c 100644 --- a/cmake/build_dependencies.cmake +++ b/cmake/build_dependencies.cmake @@ -70,9 +70,16 @@ set(_PROTOBUF_LIBRARIES ${PROTOBUF_LIB}) set(GOOGLEAPIS_GENS_PATH ${CMAKE_INSTALL_PREFIX}/gens) -if(NOT CMAKE_CROSSCOMPILING) - set(PROTOBUF_ROOT_FOLDER ${_GRPC_SRC_PATH}-build) - set(GRPC_PLUGINPATH ${_GRPC_SRC_PATH}-build) +if(CMAKE_CROSSCOMPILING) + if(NOT PROTOBUF_ROOT_FOLDER) + set(PROTOBUF_ROOT_FOLDER /usr/local/bin) + endif() + if(NOT GRPC_PLUGINPATH) + set(GRPC_PLUGINPATH /usr/local/bin) + endif() +else() + set(PROTOBUF_ROOT_FOLDER ${_GRPC_SRC_PATH}-build) + set(GRPC_PLUGINPATH ${_GRPC_SRC_PATH}-build) endif() ExternalProject_Add(googleapis