Add warning when using pkg-config with a Qt build with it disabled

This patch adds a warning that will be shown when link_pkgconfig is used
in a project but Qt's configuration has it disabled. This can happen
when Qt is built before pkg-config has been installed or if it's not
detected.

This will avoid user losing time trying to make pkg-config work while Qt
just ignores it.

Change-Id: Ieeff8dd6784b9430cfebef355855ec1be91bc96e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
Samuel Gaist 2016-06-20 00:11:34 +02:00 committed by Oswald Buddenhagen
parent 9131f6e561
commit 07d3cbbe84

View File

@ -250,7 +250,10 @@ defineReplace(pkgConfigExecutable) {
}
defineTest(packagesExist) {
contains(QT_CONFIG, no-pkg-config):return(false)
contains(QT_CONFIG, no-pkg-config) {
warning("pkg-config disabled, can't check package existence")
return(false)
}
# this can't be done in global scope here because qt_functions is loaded
# before the .pro is parsed, so if the .pro set PKG_CONFIG, we wouldn't know it