xref: /openbsd-src/gnu/llvm/clang/cmake/modules/AddGRPC.cmake (revision 1ad61ae0a79a724d2d3ec69e69c8e1d1ff6b53a0)
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