1include(FindGRPC) 2 3function(generate_clang_protos_library LibraryName ProtoFile) 4 # Take the first two args and forward the remaining to generate_proto_sources. 5 cmake_parse_arguments(PARSE_ARGV 2 PROTO "" "" "") 6 generate_proto_sources(ProtoSource ${ProtoFile} ${PROTO_UNPARSED_ARGUMENTS}) 7 8 add_clang_library(${LibraryName} ${ProtoSource} 9 PARTIAL_SOURCES_INTENDED 10 LINK_LIBS PUBLIC grpc++ protobuf) 11endfunction() 12