Project Item

A Project item represents a collection of of products. In a non-trivial project, these products are typically defined in their own files and referenced in the main project file:

Project {
    references: [
        "product1/product1.qbs",
        "product2/product2.qbs"
    ]
}

Any property prop attached to this item is available in sub-items as project.prop.

While the root of the item hierarchy is always a Project, this kind of item can also appear further down the hierarchy. Such sub-projects are ususally introduced to group products. See the SubProject Item for details.

Note: If your project consists of only one product, the Project item can be omitted.

PropertyTypeDefaultDescription
buildDirectorypathn/aThe build directory of the top-level project. This property is read-only.
namestringbasename of the file the project is defined inThe project name. Only relevant for e.g. displaying a project tree in an IDE.
profilestringn/aThe top-level profile for building the project. This property is read-only and is set by Qbs when the project is being set up.
conditionbooltrueWhether the project is enabled. If false, no products or sub-projects will be collected.
qbsSearchPathsstringListemptyThese paths are searched for imports and modules in addition to the ones listed in preferences.qbsSearchPaths. The value set here is merged with the value inherited from the parent project, if there is one. The result is inherited by all products in the project.
referencespath listemptyA list of files from which to import products. This is equivalent to defining the respective Product items directly under this Project item.
sourceDirectorypathn/aThe directory where the file containing the top-level Project item is located. This property is read-only.
minimumQbsVersionstring"1.3.0"The minimum version of qbs that is needed to build this project.

© 2015 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.