diff options
Diffstat (limited to 'mkspecs/features/qt_functions.prf')
-rw-r--r-- | mkspecs/features/qt_functions.prf | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 964e13b..f1c3e13 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -103,3 +103,17 @@ defineTest(qtPrepareTool) { } export($$1) } + +defineTest(packagesExist) { + # 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 + # yet. oops. + isEmpty(PKG_CONFIG):PKG_CONFIG = pkg-config # keep consistent with link_pkgconfig.prf! too + + for(package, ARGS) { + !system($$PKG_CONFIG --exists $$package):return(false) + } + + return(true) +} + |