[Qbs] How to check whether a project is a subproject of another project?
Vincent Hui
vincenthk007 at gmail.com
Wed Jul 17 17:25:49 CEST 2019
Hi,
I want to check whether a project is a subproject of another project. If a
project is not a subproject, its examples and tests are built. If a project
is a subproject, its examples and tests are not built.
It seems that the method for checking whether a project is a subproject is
undocumented.
I came up with a method to check whether a project is a subproject. It is
checking whether sourceDirectory is equal to path. I tried a simple
project, my method works.
"
Project {
readonly property bool isSubProject: (sourceDirectory === path) ? false
: true;
......
"
Can my method work in complicated projects?
Is there a simpler method checking whether a project is a subproject of
another project?
Thanks,
Vincent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20190717/736fb4a9/attachment.html>
More information about the Qbs
mailing list