Skip to content

Commit

Permalink
do not build CODEGEN or protobuf binaries when cross-compiling, as it…
Browse files Browse the repository at this point in the history
… is useless and may fail
  • Loading branch information
JonasVautherin committed Jul 11, 2019
1 parent b147f4e commit ce9ad11
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions third_party/grpc/CMakeLists.txt
Expand Up @@ -23,6 +23,12 @@ list(APPEND CMAKE_ARGS
"-DgRPC_BUILD_CSHARP_EXT=OFF"
)

if(CMAKE_CROSSCOMPILING)
list(APPEND CMAKE_ARGS
"-DgRPC_BUILD_CODEGEN=OFF"
)
endif()

if(ANDROID)
list(APPEND CMAKE_ARGS
"-DANDROID_ABI:STRING=${ANDROID_ABI}"
Expand Down
6 changes: 6 additions & 0 deletions third_party/protobuf/CMakeLists.txt
Expand Up @@ -13,6 +13,12 @@ list(APPEND CMAKE_ARGS
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON"
)

if(CMAKE_CROSSCOMPILING)
list(APPEND CMAKE_ARGS
"-Dprotobuf_BUILD_PROTOC_BINARIES=OFF"
)
endif()

if(ANDROID)
list(APPEND CMAKE_ARGS
"-DANDROID_ABI:STRING=${ANDROID_ABI}"
Expand Down

0 comments on commit ce9ad11

Please sign in to comment.