[Interest] Do not generate files if exists or doesn't modified...

Igor Mironchik igor.mironchik at gmail.com
Mon Sep 22 10:37:29 CEST 2014


Hi.

In one project I use Google’s ProtoBuf for network messages. And in .pro file I have the next lines:

PRE_TARGETDEPS += $$PWD/messages.pb.cc $$PWD/messages.pb.h
QMAKE_EXTRA_TARGETS += protobufc protobufhprotobufc.target = $$PWD/messages.pb.ccprotobufc.depends = FORCEprotobufc.commands = protoc --proto_path=$$PWD --cpp_out=$$PWD $$PWD/messages.protoprotobufh.target = $$PWD/messages.pb.hprotobufh.depends = protobufcHEADERS += $$PWD/messages.pb.hSOURCES += $$PWD/messages.pb.cc But every time when I compile project this files generates and recompilation occurs. How can I do that this files will generates only if they are not exists or if .proto file was modified? Is it possible with qmake? Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140922/cacef480/attachment.html>


More information about the Interest mailing list