[Interest] PRO File defines

Hamish Moffatt hamish at risingsoftware.com
Tue Apr 26 02:13:42 CEST 2016


On 25/04/16 20:58, Francisco Ares wrote:
>
> P.S.: by the way, I've been fiddling with some PRO files, and nowadays 
> use a few tricks, like:
>
>  using one source tree to build different executables, with different 
> functionality:
>
>
>
> op1=$$find(DEFINES,"_REGISTER")
> count(op1,1){
> include(../ModBus/QModBusMaster.pri)
> op2=$$find(QT,network)
> count(op2,0){
> unix|win32:QT+=network
> }

Yikes. Consider "contains(QT, network)" instead of that $$find() mess. 
Or just:

unix | win32: QT *= network

(meaning add network if it is not already there).


Hamish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160426/15cca04c/attachment.html>


More information about the Interest mailing list