Profile Item

The profiles used by Qbs are normally set up on a user's machine and are then available to all projects. See the Configuring section for information on how to set up and use profiles on the command line. In some rare cases, however, the creator of a project has complete knowledge about the system on which that project is to be built. Then it can make sense to integrate the profile into the project:

Product {
    // ...
    Profile {
        name: "my-special-profile"
        qbs.toolchain: ["gcc"]
        qbs.targetOS: ["linux", "unix"]
        qbs.architecture: "armv7a"
        cpp.toolchainInstallPath: "/opt/special-gcc/bin"
        cpp.toolchainPrefix: "arm-linux-gnueabi-"
    }
    qbs.profiles: ["my-special-profile"]
    // ...
}

The project in the above example can be built in a particular well-known environment without any additional setup.

Profile items can appear inside Product and Project items.

Profile Properties

PropertyTypeDefaultDescription
baseProfilestringundefinedThe name of a profile from which this profile inherits. If the same property is set in both this profile and the base profile, the value from this profile takes precedence.
conditionbooltrueIf this property is set to false, the profile cannot be used.
namestringundefinedThe name under which the profile can be referenced later. Setting this property is required. The value must be unique among all profiles in an entire project.

© 2017 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.