Make it possible to specify your own protoc when building protobuf in
a submodule.
When cross-compiling, we need to build the protobuf libraries for the
target architecture, yet we need to use a protoc executable built for
the host architecture.
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.