summaryrefslogtreecommitdiffstats
path: root/pacman-c++/protobuf.pri
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2011-04-09 17:13:14 +0200
committermanuel <manuel@mausz.at>2011-04-09 17:13:14 +0200
commitd5d691acfb99257d0f02d296bc8ba8522cce5bda (patch)
tree323172042ab7e31ffa72bb65ede6263b658cdf4c /pacman-c++/protobuf.pri
parentcd1b32f87128de8cc948d4f6cfa1da67291c970b (diff)
downloadfoop-d5d691acfb99257d0f02d296bc8ba8522cce5bda.tar.gz
foop-d5d691acfb99257d0f02d296bc8ba8522cce5bda.tar.bz2
foop-d5d691acfb99257d0f02d296bc8ba8522cce5bda.zip
integrate protobuf in qmake
Diffstat (limited to 'pacman-c++/protobuf.pri')
-rw-r--r--pacman-c++/protobuf.pri33
1 files changed, 33 insertions, 0 deletions
diff --git a/pacman-c++/protobuf.pri b/pacman-c++/protobuf.pri
new file mode 100644
index 0000000..03b9514
--- /dev/null
+++ b/pacman-c++/protobuf.pri
@@ -0,0 +1,33 @@
1#
2# Qt qmake integration with Google Protocol Buffers compiler protoc
3#
4# To compile protocol buffers with qt qmake, specify PROTOS variable and
5# include this file
6#
7# Example:
8# PROTOS = a.proto b.proto
9# include(protobuf.pri)
10#
11# By default protoc looks for .proto files (including the imported ones) in
12# the current directory where protoc is run. If you need to include additional
13# paths specify the PROTOPATH variable
14#
15
16PROTOPATH += .
17PROTOPATHS =
18for(p, PROTOPATH):PROTOPATHS += --proto_path=$${p}
19
20protobuf_decl.name = protobuf header
21protobuf_decl.input = PROTOS
22protobuf_decl.output = ${QMAKE_FILE_BASE}.pb.h
23protobuf_decl.commands = protoc --cpp_out="." $${PROTOPATHS} ${QMAKE_FILE_IN}
24protobuf_decl.variable_out = GENERATED_FILES
25QMAKE_EXTRA_COMPILERS += protobuf_decl
26
27protobuf_impl.name = protobuf implementation
28protobuf_impl.input = PROTOS
29protobuf_impl.output = ${QMAKE_FILE_BASE}.pb.cc
30protobuf_impl.depends = ${QMAKE_FILE_BASE}.pb.h
31protobuf_impl.commands = $$escape_expand(\\n)
32protobuf_impl.variable_out = GENERATED_SOURCES
33QMAKE_EXTRA_COMPILERS += protobuf_impl