xref: /openbsd-src/gnu/llvm/clang/cmake/modules/AddGRPC.cmake (revision 12c855180aad702bbcca06e0398d774beeafb155)
1*12c85518Srobertinclude(FindGRPC)
2*12c85518Srobert
3*12c85518Srobertfunction(generate_clang_protos_library LibraryName ProtoFile)
4*12c85518Srobert  # Take the first two args and forward the remaining to generate_proto_sources.
5*12c85518Srobert  cmake_parse_arguments(PARSE_ARGV 2 PROTO "" "" "")
6*12c85518Srobert  generate_proto_sources(ProtoSource ${ProtoFile} ${PROTO_UNPARSED_ARGUMENTS})
7*12c85518Srobert
8*12c85518Srobert  add_clang_library(${LibraryName} ${ProtoSource}
9*12c85518Srobert    PARTIAL_SOURCES_INTENDED
10*12c85518Srobert    LINK_LIBS PUBLIC grpc++ protobuf)
11*12c85518Srobertendfunction()
12