add support for PKGCONFIG_PRIVATE

this does the same as PKGCONFIG, only that the libraries end up in
LIBS_PRIVATE, not LIBS, which means they don't end up in prl files.
in the vast majority of cases, the user should use this new variable.

Change-Id: Icb57a1166f1896f51284c64e4047cfc79410e73a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
This commit is contained in:
Oswald Buddenhagen 2012-08-02 16:17:05 +02:00 committed by Qt by Nokia
parent 3dfb362782
commit a97d09a84b

View File

@ -1,6 +1,11 @@
PKG_CONFIG = $$pkgConfigExecutable()
for(PKGCONFIG_LIB, $$list($$unique(PKGCONFIG))) {
# qmake supports no empty list elements, so the outer loop is a bit arcane
pkgsfx =
for(ever) {
pkgvar = PKGCONFIG$$pkgsfx
libvar = LIBS$$pkgsfx
for(PKGCONFIG_LIB, $$list($$unique($$pkgvar))) {
# don't proceed if the .pro asks for a package we don't have!
!packagesExist($$PKGCONFIG_LIB):error("Package $$PKGCONFIG_LIB not found")
@ -19,6 +24,9 @@ for(PKGCONFIG_LIB, $$list($$unique(PKGCONFIG))) {
QMAKE_CXXFLAGS += $$PKGCONFIG_CFLAGS
QMAKE_CFLAGS += $$PKGCONFIG_CFLAGS
LIBS += $$system($$PKG_CONFIG --libs $$PKGCONFIG_LIB)
$$libvar += $$system($$PKG_CONFIG --libs $$PKGCONFIG_LIB)
}
!isEmpty(pkgsfx): break()
pkgsfx = _PRIVATE
}