path: root/doc
diff options
authorIvan Komissarov <ABBAPOH@gmail.com>2019-05-09 09:54:42 +0200
committerIvan Komissarov <ABBAPOH@gmail.com>2019-05-27 09:56:49 +0000
commit79695499bbdd0eb804dd7e15d571481ae47d6f25 (patch)
treed7e56b5fa171bba96446620ef711cca56bf88906 /doc
parent8c7b2115e6e2641c1c41d2082c087ea3d0fc101f (diff)
Add pkgconfig.sysroot property
By default, pkg-config uses qbs.sysroot property which is not desirable in some cases - for example, on macOS, even build for current system is sysrooted to the SDK folder within XCode installation. pkg-config installed with brew resides in /usr/local and can't be found within an SDK dir. For that reason, it make sense to override it manually Change-Id: Ibf779fd1bf0e87189abb2eab23d4e9e153fcca17 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'doc')
2 files changed, 43 insertions, 0 deletions
diff --git a/doc/reference/items/probe/pkgconfig-probe.qdoc b/doc/reference/items/probe/pkgconfig-probe.qdoc
index 1de84263e..7bdaf4e19 100644
--- a/doc/reference/items/probe/pkgconfig-probe.qdoc
+++ b/doc/reference/items/probe/pkgconfig-probe.qdoc
@@ -59,6 +59,20 @@
+ \qmlproperty string PkgConfigProbe::sysroot
+ This property sets the value of the \c PKG_CONFIG_SYSROOT_DIR environment variable passed to
+ the \c pkg-config binary. This variable modifies -I and -L flags to use the directories located
+ in target sysroot.
+ This property is useful when cross-compiling packages that use \c pkg-config to determine CFLAGS
+ and LDFLAGS. For example, if \c sysroot is set to \c /var/target, a \c -I/usr/include/libfoo
+ will become \c -I/var/target/usr/include/libfoo.
+ \defaultvalue \c qbs.sysroot
\qmlproperty string PkgConfigProbe::executable
The name of or the path to the pkg-config executable.
@@ -125,6 +139,9 @@
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).
+ This property sets the value of the \c PKG_CONFIG_LIBDIR environment variable passed to
+ the \c pkg-config binary.
@@ -178,6 +195,9 @@
This output property contains the list of library paths that should be passed to a linker when
using requested package.
+ This property sets the value of the PKG_CONFIG_LIBDIR environment variable passed to
+ the \c pkg-config binary.
diff --git a/doc/reference/modules/pkgconfig-module.qdoc b/doc/reference/modules/pkgconfig-module.qdoc
index 898349628..f30308895 100644
--- a/doc/reference/modules/pkgconfig-module.qdoc
+++ b/doc/reference/modules/pkgconfig-module.qdoc
@@ -67,3 +67,26 @@
\defaultvalue \c false
+ \qmlproperty path pkgconfig::sysroot
+ This property controls the value of the \l{PkgConfigProbe::sysroot}{PkgConfigProbe.sysroot}
+ property.
+ Set this property if you need to overwrite the default search sysroot path used by
+ \c pkg-config.
+ This can be useful if \c 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 \c pkg-config is typically intalled using Brew and resides in the
+ \c /usr/local directory.
+ Setting this property to \c undefined or empty (\c "") value will use pkg-config's default
+ search paths:
+ \code
+ qbs build modules.pkgconfig.sysroot:undefined
+ \endcode
+ \defaultvalue \c "" on macOS, \c qbs.sysroot on other platforms