blob: 88ab3508320a9a200ac4d87d2e2e6fea8e7846e7 [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
16protobuf_impl.commands = $$escape_expand(\n)
17protobuf_impl.variable_out = GENERATED_SOURCES
18QMAKE_EXTRA_COMPILERS += protobuf_impl