Remove some spaces at the end of lines. Change how variables are
referenced inside if() statements. Remove the space between if/endif
and the first parenthesis. Remove the duplicated condition from endif()
blocks. Make indentation more consistent. Remove unneeded duplicate
PRIVATE keywords from target_include_directories(). Remove redundant
set_source_files_properties() call, as the file is already GENERATED.
.proto files that are used by more than one target have their code
files generated multiple times, which causes issues with
add_custom_command(). De-duplicate them so they're only generated
once.
The Google Benchmark CMake build needs CMake 3.5.1 or newer. CMake 3.5.1
was released May 24, 2016 and is available in Debian stable and Ubuntu
16.04 and 18.04.
This patch fixes two issues with the targets exported by the
grpc cmake build:
- Install directories are now given relative instead of absolute.
Previously the exported targets would contain absolute paths to
their created targets when they should be relative. The actual
installation location stays the same as cmake automatically
interprets the paths relative to CMAKE_INSTALL_PREFIX
- ZLIB and OpenSSL are now linked using targets instead of the
legacy library variables if possible. Using the legacy paths
produces absolute paths to those dependencies in the export.
With this change cmake inserts the target names instead.
With these changes no more absolute paths are inserted into the
export allowing the install location to be used as an artifact
that can be moved or transfered to another machine and used there.