diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2013-08-22 01:54:28 -0700 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2013-08-22 01:54:28 -0700 |
commit | e62f8d72f349aec0865268c089ae99fedd314af1 (patch) | |
tree | 7735f34781f1ced27553b202bceaa74048018636 /share/qt/protobuf.pri | |
parent | e4348d2179b5083769582b3036f40902b0122bbf (diff) | |
parent | a41d5fe01947f2f878c055670986a165af800f9a (diff) |
Merge pull request #2539 from gavinandresen/paymentrequest
Payment Protocol Work
Diffstat (limited to 'share/qt/protobuf.pri')
-rw-r--r-- | share/qt/protobuf.pri | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/share/qt/protobuf.pri b/share/qt/protobuf.pri new file mode 100644 index 0000000000..865fe86555 --- /dev/null +++ b/share/qt/protobuf.pri @@ -0,0 +1,35 @@ +# Based on: http://code.google.com/p/ostinato/source/browse/protobuf.pri +# +# Qt qmake integration with Google Protocol Buffers compiler protoc +# +# To compile protocol buffers with qt qmake, specify PROTOS variable and +# include this file +# +# Example: +# PROTOS = a.proto b.proto +# include(protobuf.pri) +# +# Set PROTO_PATH if you need to set the protoc --proto_path search path +# Set PROTOC to the path to the protoc compiler if it is not in your $PATH +# + +isEmpty(PROTO_DIR):PROTO_DIR = . +isEmpty(PROTOC):PROTOC = protoc + +PROTOPATHS = +for(p, PROTO_PATH):PROTOPATHS += --proto_path=$${p} + +protobuf_decl.name = protobuf header +protobuf_decl.input = PROTOS +protobuf_decl.output = $${PROTO_DIR}/${QMAKE_FILE_BASE}.pb.h +protobuf_decl.commands = $${PROTOC} --cpp_out="$${PROTO_DIR}" $${PROTOPATHS} --proto_path=${QMAKE_FILE_IN_PATH} ${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 = $${PROTO_DIR}/${QMAKE_FILE_BASE}.pb.cc +protobuf_impl.depends = $${PROTO_DIR}/${QMAKE_FILE_BASE}.pb.h +protobuf_impl.commands = $$escape_expand(\\n) +protobuf_impl.variable_out = GENERATED_SOURCES +QMAKE_EXTRA_COMPILERS += protobuf_impl |