Spot on. Thanks a lot! On Wed, 24 Mar 2021 at 13:31, Jochen Ulrich <jochen.ulr...@bee360.com> wrote:
> How about setting the `excludeFiles` conditionally? > So something like this: > > > > Group { > > files: "*.cpp" > > prefix: "**/" > > excludeFiles: qbs.targetOS.contains("linux") ? "*_windows.cpp" : > "*_linux.cpp" > > } > > > > Not sure if this works, though. > > > > Best > > Jochen > > > > *Von: *Qbs <qbs-boun...@qt-project.org> im Auftrag von Dan Pat < > danni...@gmail.com> > *Datum: *Mittwoch, 24. März 2021 um 08:05 > *An: *qbs <qbs@qt-project.org> > *Betreff: *[Qbs] Grouping files > > Hi. I have a complex directory structure where cpp/h files reside. To add > these files to the project, I would normally create a Group and specify > the top level directory using a wild card '**' - saves me a lot of typing. > Now, I am faced with a task of conditionally selecting implementation files > for different platform targets, that is files '*_linux.cpp' must be chosen > for the linux target and '*_windows.cpp' - for the windows target. There > are just a couple of such places, deep down the directory hierarchy, where > such separation is needed, not that this is a regular thing. I don't know > of any way to exclude files using a wildcard, I guess that's what the > "excludeFiles" property is for. But using this property means I have to > create another Group to deal with implementation files which will be shown > separately in the project tree view. If what you want is a single view of > the directory structure with the appropriate implementation files shown > (and it's what I want) you need to abandon the wildcard description (to a > degree depending on the actual directory structure and location of > implementation files) and list some directories manually (a lot, in may > case). So, do I accept it and live with it? Or, maybe there's an approach I > am missing? >
_______________________________________________ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs