From 205987750d51a446118f50b9ed583d40a565f445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Str=C3=B8mme?= Date: Tue, 19 Jan 2016 16:48:40 +0100 Subject: Make pkgConfigExecutable() work when a pkg-config is defined in the spec Commit 6e6f27b6 made it possible to set the PKG_CONFIG variable using CROSS_COMPILE as a prefix. The problem with that solution is that it makes pkgConfigExecutable() skip the environment setup for pkg-config as well, as it expects the pre-set command to be self-contained - which it isn't. To avoid this problem we need to store the pkg-config define in the device spec in a separate variable. Change-Id: Id8ae7fb03d9253be55840e23fe73b30815ee86c3 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/qt_functions.prf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mkspecs/features/qt_functions.prf') diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index f1982d6e4e..82349be85e 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -215,7 +215,10 @@ defineTest(qtAddTargetEnv) { defineReplace(pkgConfigExecutable) { isEmpty(PKG_CONFIG) { - PKG_CONFIG = pkg-config + !isEmpty(QMAKE_PKG_CONFIG): \ + PKG_CONFIG = $$QMAKE_PKG_CONFIG + else: \ + PKG_CONFIG = pkg-config sysroot.name = PKG_CONFIG_SYSROOT_DIR sysroot.value = $$PKG_CONFIG_SYSROOT_DIR -- cgit v1.2.3