blob: 3ff4309555006542fe849f7b3b590fb6b6fde2a4 [file] [log] [blame]
Zhenkai Zhu6fcdee42012-05-30 17:02:49 -07001PROTOPATH += .
2PROTOPATHS =
3for(p, PROTOPATH):PROTOPATHS += --proto_path=$${p}
4
5protobuf_decl.name = protobuf header
6protobuf_decl.input = PROTOS
7protobuf_decl.output = ${QMAKE_FILE_BASE}.pb.h
8protobuf_decl.commands = protoc --cpp_out="." $${PROTOPATHS} ${QMAKE_FILE_NAME}
9protobuf_decl.variable_out = GENERATED_FILES
10QMAKE_EXTRA_COMPILERS += protobuf_decl
11
12protobuf_impl.name = protobuf implementation
13protobuf_impl.input = PROTOS
14protobuf_impl.output = ${QMAKE_FILE_BASE}.pb.cc
15protobuf_impl.depends = ${QMAKE_FILE_BASE}.pb.h
Zhenkai Zhu85845d22012-06-01 23:10:43 -070016protobuf_impl.commands = $$escape_expand(\\n)
Zhenkai Zhu6fcdee42012-05-30 17:02:49 -070017protobuf_impl.variable_out = GENERATED_SOURCES
18QMAKE_EXTRA_COMPILERS += protobuf_impl