- Qbs Manual
- Qbs 1.23.0

Profile ◦ Properties

# Project

Represents a collection of products and properties. More...

- List of all members, including inherited members

## Properties

- buildDirectory : path
- condition : bool
- minimumQbsVersion : string
- name : string
- profile : string
- qbsModuleProviders : stringList
- qbsSearchPaths : stringList
- references : pathList
- sourceDirectory : path

## Detailed Description

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 usually introduced to group products. See SubProject for details.

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

## Property Documentation

[read-only] buildDirectory : path

The build directory of the top-level project.

condition : bool

Whether the project is enabled. If `false`, no products or sub-projects will be collected.

Default: `true`

minimumQbsVersion : string

The minimum version of Qbs that is needed to build this project.

Default: `"1.3.0"`

name : string

The project name. Only relevant when displaying a project tree in an IDE, for example.

Default: The basename of the file that defines the project.

[read-only] profile : string

The top-level profile for building the project. This property is set by Qbs when the project is being set up.

qbsModuleProviders : stringList

The list of Module Providers to use for this project.

Providers contribute to the qbsSearchPaths in the order specified here, so modules generated by providers specified earlier are prioritized. Currently, this order also corresponds with the actual execution order of the providers, but this should not be relied upon.

This property was introduced in Qbs 1.21.

See also Product::qbsModuleProviders.

qbsSearchPaths : stringList

A list of paths that are searched for imports, modules and module providers 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.

For the details about how to add custom items, see the Custom Modules and Items page.

Default: An empty list

references : pathList

A list of files from which to import products. This is equivalent to defining the respective Product items directly under this Project item.

Default: An empty list

[read-only] sourceDirectory : path

The directory where the file containing the top-level Project item is located.

Profile ◦ Properties