qbspkgconfig

Module provider based on the qbspkg-config library. More...

Since: Qt 1.20

Properties

Detailed Description

Qbs uses a built-in parser of the *.pc files and does not require the presence of the pkg-config tool in the system. However, if the pkg-config tool is present, Qbs will use the same libDirs as the system pkg-config uses by default; otherwise, a built-in list of paths is used.

In order to enable usage of this provider in your Product, set the qbsModuleProviders property as shown in the example below:

CppApplication {
    consoleApplication: true
    Depends { name: "zlib"; required: false }
    condition: zlib.present
    name: "PkgConfigProviderExample"
    files: "main.c"
    qbsModuleProviders: ["qbspkgconfig"]
}

Property Documentation

executableFilePath : string

The path to the pkg-config executable. If not set, the pkg-config from PATH is used.

Default: undefined


extraPaths : stringList

Set this if you need to add extra search directories.

This property is the equivalent of the PKG_CONFIG_PATH variable for the pkg-config tool.

Default: Undefined


libDirs : stringList

Set this if you need to overwrite the default search directories.

Note: You do not need to set this for cross-compilation in order to point to the sysroot. Qbs does that for you.

This property is the equivalent of the PKG_CONFIG_LIBDIR variable for the pkg-config tool.

Default: Undefined


staticMode : bool

If this property is true, then Qbs will include "private" libs and dependencies of the package. This property is the equivalent of the --static option for the pkg-config tool.

Set this if your product is to be linked statically.

Default: false


sysroot : path

Set this property if you need to overwrite the default search sysroot path used by pkg-config.

This can be useful if pkg-config files are located in the directory other than qbs.sysroot. This is the case on macOS platform - all XCode profiles are sysrooted to the SDK directory, but pkg-config is typically intalled using Brew and resides in the /usr/local directory.

Setting this property to undefined or empty ("") value will use pkg-config's default search paths:

qbs resolve moduleProviders.qbspkgconfig.sysroot:undefined

This property is the equivalent of the PKG_CONFIG_SYSROOT_DIR variable for the pkg-config tool.

Default: "" on macOS, qbs.sysroot on other platforms


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