mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
added qt file to handle protobuf targets
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5636 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
91bf67a7fe
commit
a57d627074
36
retroshare-nogui/src/protobuf.pri
Normal file
36
retroshare-nogui/src/protobuf.pri
Normal file
@ -0,0 +1,36 @@
|
||||
#
|
||||
# Qt qmake integration with Google Protocol Buffers compiler protoc
|
||||
#
|
||||
# To compile protocol buffers with qt qmake, specify PROTOS variable and
|
||||
# include this file
|
||||
#
|
||||
# Example:
|
||||
# LIBS += /usr/local/lib/libprotobuf.so
|
||||
# PROTOS = a.proto b.proto
|
||||
# include(protobuf.pri)
|
||||
#
|
||||
# By default protoc looks for .proto files (including the imported ones) in
|
||||
# the current directory where protoc is run. If you need to include additional
|
||||
# paths specify the PROTOPATH variable
|
||||
#
|
||||
|
||||
PROTOPATH += .
|
||||
PROTOPATH += ../Protocol
|
||||
PROTOPATHS =
|
||||
for(p, PROTOPATH):PROTOPATHS += --proto_path=$${p}
|
||||
|
||||
protobuf_decl.name = protobuf header
|
||||
protobuf_decl.input = PROTOS
|
||||
protobuf_decl.output = ${QMAKE_FILE_BASE}.pb.h
|
||||
protobuf_decl.commands = protoc --cpp_out="." $${PROTOPATHS} ${QMAKE_FILE_NAME}
|
||||
protobuf_decl.variable_out = GENERATED_FILES
|
||||
QMAKE_EXTRA_COMPILERS += protobuf_decl
|
||||
|
||||
protobuf_impl.name = protobuf implementation
|
||||
protobuf_impl.input = PROTOS
|
||||
protobuf_impl.output = ${QMAKE_FILE_BASE}.pb.cc
|
||||
protobuf_impl.depends = ${QMAKE_FILE_BASE}.pb.h
|
||||
protobuf_impl.commands = $$escape_expand(\n)
|
||||
protobuf_impl.variable_out = GENERATED_SOURCES
|
||||
QMAKE_EXTRA_COMPILERS += protobuf_impl
|
||||
|
Loading…
Reference in New Issue
Block a user