[Qbs] Handling particularities of different OS's

Christian Kandeler christian.kandeler at qt.io
Mon Oct 16 10:54:31 CEST 2017


On Sun, 15 Oct 2017 23:08:19 +0100
Nuno Santos <nunosantos at imaginando.pt> wrote:

> I’m giving my first steps with qbs in order to embrace the future and start porting my framework to it. I have just tried it for the first time today but I have already been faced with a new problem I can’t find on documentation. Problem:
> 
> - I support iOS, Android, Windows & Mac
> 
> For the same app/lib I might need to include different source files

This is done via the Group item: https://doc.qt.io/qbs/group-item.html

> and links with different libs. 

This is done via the Properties item:
https://doc.qt.io/qbs/properties-item.html

> I’m basically looking for the equivalent to macs { ,} android { }, etc

The two items mentioned above should cover this. In both cases, use a condition based on the target OS, e.g. "condition: qbs.targetOS.contains('macos')".


Christian



More information about the Qbs mailing list