OTHER: Redo pkg-config handling once again.

This commit is contained in:
Thomas Frauendorfer 2008-10-17 00:25:54 +02:00
parent 11b7e5e6e7
commit 54cb2086ee
3 changed files with 14 additions and 48 deletions

View file

@ -1,24 +1,10 @@
defineTest(pkgconfig_exists) {
packages = $$1
count(packages, 0): return(false)
system(pkg-config --exists $$packages) {
return(true)
} else {
return (false)
# This file is intended replacement for Qt's link_pkgconfig
for(PACKAGE, $$list($$unique(PKGCONFIG))) {
system(pkg-config --exists $$PACKAGE) {
CONFIG += $$PACKAGE
}
}
defineReplace(pkgconfig_cflags) {
packages = $$1
count(packages, 0): return(false)
return ($$system(pkg-config --cflags $$packages))
}
defineReplace(pkgconfig_libs) {
packages = $$1
count(packages, 0): return(false)
return ($$system(pkg-config --libs $$packages))
}
QMAKE_CXXFLAGS += $$system(pkg-config --cflags $$PKGCONFIG)
QMAKE_CFLAGS += $$system(pkg-config --cflags $$PKGCONFIG)
LIBS += $$system(pkg-config --libs $$PKGCONFIG)