diff options
author | Michal Klocek <michal.klocek@qt.io> | 2017-12-15 17:52:47 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2018-01-23 17:00:53 +0000 |
commit | d502c6e9d09803dd268100f8c53cf7bc563e3d1d (patch) | |
tree | f998c3179401c09e4399015b19e34593f12ef3c5 /src/core/config/linux.pri | |
parent | 3cec2ccb0ffdd41a41ab55d4c1ba88d4866e71d1 (diff) |
Add pkg-host wrapper script
Currently we need pkg-config host for cross-builds to build
build tools. Unfortunately if build environment exports
PKG_CONFIG_* variables pkg-config will pick them up also for host builds,
which can lead to compile errors. Create pkg-config-host_wrapper
which explicitly unsets PKG_CONFIG_* variables.
This is a temporary workaround till proper solution is implemented
in qtbase.
Task-number: QTBUG-65079
Change-Id: I9aff4a27ba62e096ed4c023cf022a41833260178
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/config/linux.pri')
-rw-r--r-- | src/core/config/linux.pri | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri index 6f7b27f10..d337f686f 100644 --- a/src/core/config/linux.pri +++ b/src/core/config/linux.pri @@ -113,7 +113,14 @@ host_build { PKGCONFIG = $$first($$list($$pkgConfigExecutable())) gn_args += pkg_config=\"$$PKGCONFIG\" PKG_CONFIG_HOST = $$(GN_PKG_CONFIG_HOST) - isEmpty(PKG_CONFIG_HOST): PKG_CONFIG_HOST = pkg-config + pkgConfigLibDir = $$(PKG_CONFIG_LIBDIR) + pkgConfigSysrootDir = $$(PKG_CONFIG_SYSROOT_DIR) + isEmpty(PKG_CONFIG_HOST): PKG_CONFIG_HOST = $$QMAKE_PKG_CONFIG_HOST + cross_compile { + !isEmpty(pkgConfigLibDir)|!isEmpty(pkgConfigSysrootDir) { + PKG_CONFIG_HOST = $$pkgConfigHostExecutable() + } + } gn_args += host_pkg_config=\"$$PKG_CONFIG_HOST\" } |