xref: /llvm-project/clang/cmake/modules/AddGRPC.cmake (revision 275bca657529ac07781c5f84e6485fa9d98a1c44)
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