[Qbs] How to provide an "export" header

Björn Schäpers qt-maillist at hazardy.de
Fri Jul 12 22:24:57 CEST 2024


Hi,

I have multiple dynamic libraries in my project tree, and use an export header 
similar to your qbs_export.h. Overtime the style of those headers had changed a 
bit and recently I replaced them by something generated from qbs. I generated 
them in the source directory, so that #include "export.hpp" just worked and even 
worked for the depending products.

Now (since 67af0c9517b01c482f425a6761b1cf38c486d3c3) that's not possible 
anymore, I understand the reasoning, but now I don't know how to solve the 
issue. If I generate the file in the build directory I'd have to add it to the 
include path, that's easy from the module. But how to add it to the include path 
from products depending on the dynamic library? And even further on products 
depending on those? The header did just propagate indefinitely, is there a way 
to achieve similar things with properties? In that case I even would exchange 
the header with just cpp.defines.

I similar problem, but not to propagate stuff, will occur for my translation 
stuff. I made a rule to update the *.ts files when a cpp is changed, and of 
course I want to commit the translation files and thus they are in the source 
directory. How about that? As far as I know there is no official support for 
lupdate within qbs, right?

Kind regards,
Björn.


More information about the Qbs mailing list