sproto.conf 935 B

123456789101112131415161718192021
  1. ### @usage: EXPORT_YMAPS_PROTO() # maps-specific
  2. ###
  3. ### Maps-specific .proto handling: IMPORT_YMAPS_PROTO() + maps protobuf namespace.
  4. macro EXPORT_YMAPS_PROTO() {
  5. PROTO_NAMESPACE(GLOBAL maps/doc/proto)
  6. }
  7. macro _YMAPS_GENERATE_SPROTO_HEADER(File) {
  8. .CMD=${cwd;rootdir;input:File} ${tool:"maps/libs/sproto/sprotoc"} -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_PATH --sproto_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE ${input;rootrel:File} ${output;hide;norel;nopath;noext:File.sproto.h} ${kv;hide:"p PB"} ${kv;hide:"pc yellow"}
  9. .PEERDIR=maps/libs/sproto
  10. }
  11. ### @usage: YMAPS_SPROTO(ProtoFiles...) # maps-specific
  12. ###
  13. ### Maps-specific .proto handling: generate .sproto.h files using maps/libs/sproto/sprotoc.
  14. macro YMAPS_SPROTO(FILES...) {
  15. SET(PROTO_HEADER_EXTS .pb.h .sproto.h)
  16. foreach (FILE : $FILES) {
  17. [.proto]=$_YMAPS_GENERATE_SPROTO_HEADER($FILE)
  18. }
  19. }