aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
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 /share
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 'share')
-rw-r--r--share/qbs/module-providers/__fallback/fallback.qbs1
-rw-r--r--share/qbs/modules/pkgconfig/pkgconfig.qbs5
2 files changed, 6 insertions, 0 deletions
diff --git a/share/qbs/module-providers/__fallback/fallback.qbs b/share/qbs/module-providers/__fallback/fallback.qbs
index e23851951..632d1aa7a 100644
--- a/share/qbs/module-providers/__fallback/fallback.qbs
+++ b/share/qbs/module-providers/__fallback/fallback.qbs
@@ -50,6 +50,7 @@ Module {
Probes.PkgConfigProbe {
id: pkgConfigProbe
condition: pkgconfig.present
+ sysroot: pkgconfig.sysroot
name: theName
executable: pkgconfig.executableFilePath
libDirs: pkgconfig.libDirs
diff --git a/share/qbs/modules/pkgconfig/pkgconfig.qbs b/share/qbs/modules/pkgconfig/pkgconfig.qbs
index 92e0bfb25..ec4b59188 100644
--- a/share/qbs/modules/pkgconfig/pkgconfig.qbs
+++ b/share/qbs/modules/pkgconfig/pkgconfig.qbs
@@ -47,6 +47,11 @@ Module {
names: "pkg-config"
}
+ property path sysroot: {
+ if (qbs.targetOS.contains("macos"))
+ return "";
+ return qbs.sysroot;
+ }
property string executableFilePath: pkgconfigProbe.filePath
property stringList libDirs
property bool staticMode: false