Qt Extended Home · Build System Home · Reference · User Guide · Internals codeless banner

pkg-config

Qt (and thus Qt Embedded) do nothing special with pkg-config. In fact, if you are cross-compiling (as is usually the case with Qt Embedded) pkg-config is ignored unless you pass -force-pkg-config. This is because pkg-config files are generally unsuitable for use when cross-compiling.

Qt Extended attempts to work around this limitation by providing the -pkg-config switch. This switch defaults to on and requires that you set PKG_CONFIG_PATH and PKG_CONFIG_PREFIX in the device's environment file.

Qt Extended creates a wrapper for pkg-config and inserts it at the front of the PATH. Qt Embedded is passed the -force-pkg-config switch so that it uses this wrapper script.

The script causes the variable prefix in .pc files to be changed. It does not allow use of .pc files that do not use prefix. It also sets the exec_prefix value.

These checks ensure that the .pc files from the toolchain can be trusted even if they would normally not work.

Note that pkg-config is also used when -qvfb is passed (or the reference device is used) because in that case you are building for your system, so any available pkg-config files will be correct.

See also Overviews and Device Profiles.


Copyright © 2009 Nokia
Qt Extended - Build System Documentation