- Update CMakeLists.txt (original template and generated code)
to prevent forcefully linking `dl` on all UNIX platforms,
and rely on `${CMAKE_DL_LIBS}` portable variable instead.
- Do not try linking against `librt` on macOS.
- Add a `config_freebsd` directory containing the header file
generated by the `configure` script for the `ares` library.
After this change specifying -DGRPC_USE_PROTO_LITE=On at the cmake
command line will cause gRPC to use the protobuf-lite runtime what
can result in a major size improvement.
A full build of protobuf depends on gmock even though it is not part of
a standrad checkout. This CL explicitly disable the build of the
protobuf tests to get rid of this dependency.
If somebody want to build the protobuf tests then they have to download
gmock to the protobuf directory and specify -Dprotobuf_BUILD_TESTS=ON
to the cmake command line.
Fixes https://github.com/grpc/grpc/issues/7233
This cmake file only builds the C and C++ code and all the third party
dependencies with very few configuration options but it supports
building on Linux and OSX as well as cross compiling.
(tested {Linux, OSX} -> Android { arm, aarch64, x86 })