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 <oswald.buddenhagen@qt.io>
This commit is contained in:
parent
99331f661d
commit
ed99ffdc32
@ -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) {
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user