My point is: Before just the exporting product needed to depend on the module which generated the header by a single depends and setting one property on the module. Now the product still depends on the module, sets the property, but also has to state something in its Export section. More (repetitive) work for the same goal.

Currently qbs keeps on breaking stuff, which can be worked around, but that leads to more work. * The removal of the fallback provider: Yeah okay, maybe qbspkgconfig is superior, but the fallback just worked without providing qbsModuleProviders, I think that is superior in the usage. * Now I can't generate files outside the build directory anymore, but what did we gain? * And as I understood from the recent commits Export { cpp.includePaths: ["include"] } has to be changed to [exportingProduct.sourceDirectory + "/include" or similar. I also see no gain for the users, only pain.

Am 13.07.2024 um 15:26 schrieb Иван Комиссаров:
You can add it once to the base item of the products (possibly with some customisation using a prop). Usually there is already such an item in every product.

Ivan

13 июля 2024 г., в 14:13, Björn Schäpers <qt-maill...@hazardy.de> написал(а):

Am 13.07.2024 um 02:15 schrieb Иван Комиссаров:

12 июля 2024 г., в 23:24, Björn Schäpers<qt-maill...@hazardy.de>  написал(а):

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.
That’s what Export item for

DynamicLibrary {
     // library stuff here
     Export {
          Depends { name: «cpp» }
          cpp.includePaths: FileInfo.joinPaths(exportingProduct.buildDirectory, 
«path», «to», «headers»)
     }
}


I know what Export does, but the point is, I have to add that to all my 50+ products.
Although I've had an error in my thoughts. Of course this will work.

_______________________________________________
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs

Reply via email to