[Qbs] Exporting libraries to link only for MinGW

Richard Weickelt richard at weickelt.de
Sat Feb 22 09:56:09 CET 2020


> You don't need a group here in the first place. Just
> cpp.dynamicLibraries: {
>    var libs = [];
>    if(qbs.toolchain.contains("mingw"))
>        libs = libs.concat(["pthread", "ole32"] )
>    return libs;
> }

Or to be more explicit: You **must** not use the Group item for this purpose. The Group item selects file artifacts by name or tag and assigns module properties to them. Since You don’t select any artifacts, the Group has no effect. You probably want to use the Properties item (which works in modules as well. The limitation is that only one Properties item should write the same module property at a time (mutual exclusive). But that seems to be the case in your example.

Richard
-------------- next part --------------
_______________________________________________
Qbs mailing list
Qbs at qt-project.org
https://lists.qt-project.org/listinfo/qbs


More information about the Qbs mailing list