From 07d3cbbe8450f870446f4bd2af2ec47baff23dc3 Mon Sep 17 00:00:00 2001 From: Samuel Gaist Date: Mon, 20 Jun 2016 00:11:34 +0200 Subject: 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 --- 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 86396958f1..4a1d265a8b 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -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 -- cgit v1.2.3