Qbs Manual | Command-Line Interface | create-project

Qbs 1.12.0

# create-project

## Synopsis

      qbs create-project [--blacklist <blacklist>] [--whitelist <whitelist>]
                         [--flat]

## Description

Automatically generates Qbs project files from an arbitrary directory structure. You can filter the files to add to the project by blacklisting or whitelisting them. The command creates nested project files, unless you use the `--flat` option.

This is a useful starting point when migrating from other build tools, such as qmake or CMake.

Note: Run this command from the project directory.

After generating the initial .qbs files, add the missing configuration variables and functions to them.

## Options

### `--blacklist <blacklist>`

Ignores files whose names match the patterns specified by `<blacklist>`. The list entries can contain wildcards and are separated by commas.

By default, no files are ignored.

### `--whitelist <whitelist>`

Considers only files whose names match the patterns specified by `<whitelist>`. The list entries can contain wildcards and are separated by commas.

By default, all files are considered.

### `--flat`

Does not create nested project files, even if there are subdirectories and the top-level directory does not contain any files.

### `--help|-h|-?`

Displays help for the command.

## Examples

Creates `.qbs` files in the project directory when run from there:

      qbs create-project