From ed99ffdc32270633058eed45d64ccceea9b9de4f Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 26 Oct 2016 13:42:24 +0200 Subject: Write PKG_CONFIG_EXECUTABLE to qmodule.pri ... and use that variable in qt_configure.prf to find the pkg-config we detected during qtbase configuration. This is required for modules outside of qtbase being able to use pkg-config to configure external libraries. We do not use the PKG_CONFIG variable any more, as that interferes with the $$pkgConfigExecutable() function, which some Qt modules still use. Change-Id: I8886a266207e04301009fe8207c16b02c5455b2f Reviewed-by: Oswald Buddenhagen --- configure.pri | 5 +++-- mkspecs/features/qt_configure.prf | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/configure.pri b/configure.pri index 7ec845375e..57c266a581 100644 --- a/configure.pri +++ b/configure.pri @@ -325,8 +325,9 @@ defineTest(qtConfOutput_qreal) { defineTest(qtConfOutput_pkgConfig) { !$${2}: return() - PKG_CONFIG = $$eval($${currentConfig}.tests.pkg-config.pkgConfig) - export(PKG_CONFIG) + PKG_CONFIG_EXECUTABLE = $$eval($${currentConfig}.tests.pkg-config.pkgConfig) + qtConfOutputVar(assign, "privatePro", "PKG_CONFIG_EXECUTABLE", $$PKG_CONFIG_EXECUTABLE) + export(PKG_CONFIG_EXECUTABLE) # this method also exports PKG_CONFIG_(LIB|SYSROOT)DIR, so that tests using pkgConfig will work correctly PKG_CONFIG_SYSROOT_DIR = $$eval($${currentConfig}.tests.pkg-config.pkgConfigSysrootDir) !isEmpty(PKG_CONFIG_SYSROOT_DIR) { diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index e8fa0c6f76..7118a177fe 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -376,7 +376,7 @@ defineReplace(qtConfPkgConfig) { $$host { pkg_config = $$qtConfFindInPath("pkg-config") } else { - pkg_config = "$$qtConfPkgConfigEnv()$$PKG_CONFIG" + pkg_config = "$$qtConfPkgConfigEnv()$$PKG_CONFIG_EXECUTABLE" } return($$pkg_config) -- cgit v1.2.3