Qbs Manual

Qbs 1.13.0

# PkgConfigProbe QML Type

Retrieves the information about installed packages using the pkg-config binary. More...

Import Statement: | import

- List of all members, including inherited members

## Properties

- compilerFlags : stringList
- defines : stringList
- exactVersion : string
- executable : string
- forStaticBuild : bool
- includePaths : stringList
- libDirs : stringList
- libraries : stringList
- libraryPaths : stringList
- linkerFlags : stringList
- maxVersion : string
- minVersion : string
- modversion : stringList
- name : string
- packageNames : stringList

## Detailed Description

This probe takes the package name or the list of package names as input and returns the information that is required to compile and link using those packages.

Usually, you can simply use a Depends item as described in How do I build against libraries that provide pkg-config files?.

Alternatively, the probe can be used directly as follows:

      CppApplication {
          name: project.name
          Probes.PkgConfigProbe {
              id: pkgConfig
              name: "QtCore"
              minVersion: '4.0.0'
              maxVersion: '5.99.99'
          }
          files: 'main.cpp'
          cpp.cxxFlags: pkgConfig.cflags
          cpp.linkerFlags: pkgConfig.libs
      }

## Property Documentation

compilerFlags : stringList

This output property contains the list of flags that should be passed to a compiler when using requested package.

Default: Undefined

defines : stringList

This output property contains the list of defines that should be passed to a compiler when using requested package.

Default: Undefined

exactVersion : string

The exact version of the required package. If set, pkg-config will ignore packages with version greater than the value of this property.

Default: Undefined

executable : string

The name of or the path to the pkg-config executable.

Default: "pkg-config"

forStaticBuild : bool

If `true`, pkg-config will return linker flags for a static linking instead of dynamic.

Default: `false`

includePaths : stringList

This output property contains the list of include paths that should be passed to a compiler when using requested package.

Default: Undefined

libDirs : stringList

List of full, non-sysrooted paths where pkg-config should search for .pc files. This overrides the built-in path (which is usually /usr/lib/pkgconfig).

Default: Undefined

libraries : stringList

This output property contains the list of library names that should be passed to a linker when using requested package.

Default: Undefined

libraryPaths : stringList

This output property contains the list of library paths that should be passed to a linker when using requested package.

Default: Undefined

linkerFlags : stringList

This output property contains the list of flags that should be passed to a linker when using requested package.

Default: Undefined

maxVersion : string

The maximum version of the required package. If set, pkg-config will ignore packages with version that is not equal to the value of this property.

Default: Undefined

minVersion : string

The minimum version of the required package. If set, pkg-config will ignore packages with version less than the value of this property.

Default: Undefined

modversion : stringList

This output property contains the version of the found package.

Default: Undefined

name : string

The name this probe. This property is used as PkgConfigProbe.packageNames value by default.

Default: Undefined

packageNames : stringList

The list of package names to pass to the pkg-config executable. For each package, pkg-config will return the information required to compile and link to this package.

Default: [PkgConfigProbe.name]